/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
@Override public boolean validateDigest(String message, String digest) { return digest == null ? false : this.digester.matches(message, digest); } }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
@Override public boolean validateDigest(String message, String digest) { return digest == null ? false : this.digester.matches(message, digest); } }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * <p> * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * </p> * <p> * This password encryptor expects encrypted passwords being matched to * include the "{SSHA}" prefix, and will fail if not. * </p> * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
/** * <p> * Checks an unencrypted (plain) password against an encrypted one * (a digest) to see if they match. * </p> * <p> * This password encryptor expects encrypted passwords being matched to * include the "{SMD5}" prefix, and will fail if not. * </p> * * @param plainPassword the plain password to check. * @param encryptedPassword the digest against which to check the password. * @return true if passwords match, false if not. * @see StandardStringDigester#matches(String, String) */ public boolean checkPassword(final String plainPassword, final String encryptedPassword) { return this.digester.matches(plainPassword, encryptedPassword); }
public boolean verify(final String value, final CipherAlgorithm cipherAlgorithm, final String encodedValue) { boolean res = false; try { if (value != null) { if (cipherAlgorithm == null || cipherAlgorithm == CipherAlgorithm.AES) { res = encode(value, cipherAlgorithm).equals(encodedValue); } else if (cipherAlgorithm == CipherAlgorithm.BCRYPT) { res = BCrypt.checkpw(value, encodedValue); } else { res = getDigester(cipherAlgorithm).matches(value, encodedValue); } } } catch (Exception e) { LOG.error("Could not verify encoded value", e); } return res; }