/** * Checks a password's validity. This implementation completely ignores salt, as jasypt's * <tt>PasswordEncryptor</tt> and <tt>StringDigester</tt> normally use a random one. Thus, it * can be safely passed as <tt>null</tt>. * * @param encPass The encrypted password (digest) against which to check. * @param rawPass The password to be checked. * @param salt The salt, which will be ignored. It can be null. */ public boolean isPasswordValid(final String encPass, final String rawPass, final Object salt) { checkInitialization(); if (this.useEncryptor.booleanValue()) { return this.passwordEncryptor.checkPassword(rawPass, encPass); } return this.stringDigester.matches(rawPass, encPass); }
@Override public boolean hashMatches(String raw, String hash) { return passwordEncryptor.matches(raw, hash); }
/** * Checks a password's validity. This implementation completely ignores * salt, as jasypt's <tt>PasswordEncryptor</tt> and <tt>StringDigester</tt> * normally use a random one. Thus, it can be safely passed as <tt>null</tt>. * * @param encPass The encrypted password (digest) against which to check. * @param rawPass The password to be checked. * @param salt The salt, which will be ignored. It can be null. */ public boolean isPasswordValid(final String encPass, final String rawPass, final Object salt) { checkInitialization(); if (this.useEncryptor.booleanValue()) { return this.passwordEncryptor.checkPassword(rawPass, encPass); } return this.stringDigester.matches(rawPass, encPass); }
/** * Checks a password's validity. This implementation completely ignores * salt, as jasypt's <tt>PasswordEncryptor</tt> and <tt>StringDigester</tt> * normally use a random one. Thus, it can be safely passed as <tt>null</tt>. * * @param encPass The encrypted password (digest) against which to check. * @param rawPass The password to be checked. * @param salt The salt, which will be ignored. It can be null. */ public boolean isPasswordValid(final String encPass, final String rawPass, final Object salt) { checkInitialization(); if (this.useEncryptor.booleanValue()) { return this.passwordEncryptor.checkPassword(rawPass, encPass); } return this.stringDigester.matches(rawPass, encPass); }
if (!this.digester.matches(getSignatureData(expiryTimestamp, username, password), digestedSignature)) { throw new InvalidCookieException("Cookie signature is not valid");
if (!this.digester.matches(getSignatureData(expiryTimestamp, username, password), digestedSignature)) { throw new InvalidCookieException("Cookie signature is not valid");