Package org.passay.rule
Class DigestHistoryRule
java.lang.Object
org.passay.rule.HistoryRule
org.passay.rule.DigestHistoryRule
- All Implemented Interfaces:
Rule
Rule for determining if a password matches one of any previous digested password a user has chosen. If no password
reference has been set that matches the label on the rule, then passwords will meet this rule. See
PasswordData.getPasswordReferences().-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CharsetCharacter set to use for undigested passwords.private final org.cryptacular.bean.HashBean<CharSequence>Hash bean to use for comparing hashed passwords.Fields inherited from class org.passay.rule.HistoryRule
ERROR_CODE, reportAllFailures -
Constructor Summary
ConstructorsConstructorDescriptionDigestHistoryRule(org.cryptacular.bean.HashBean<CharSequence> bean) Creates new digest history rule which operates on password references that were digested with the supplied hash.DigestHistoryRule(org.cryptacular.bean.HashBean<CharSequence> bean, Charset set) Creates new digest history rule which operates on password references that were digested with the supplied hash. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanmatches(UnicodeString password, Reference reference) Determines whether a digested password matches a reference value.Methods inherited from class org.passay.rule.HistoryRule
createRuleResultDetailParameters, getReportAllFailures, toString, validate
-
Field Details
-
hashBean
Hash bean to use for comparing hashed passwords. -
charset
Character set to use for undigested passwords.
-
-
Constructor Details
-
DigestHistoryRule
Creates new digest history rule which operates on password references that were digested with the supplied hash.- Parameters:
bean- encoding hash bean
-
DigestHistoryRule
Creates new digest history rule which operates on password references that were digested with the supplied hash.- Parameters:
bean- encoding hash beanset- to use for undigested passwords
-
-
Method Details
-
matches
Determines whether a digested password matches a reference value.- Overrides:
matchesin classHistoryRule- Parameters:
password- candidate clear text password.reference- reference digested password.- Returns:
- true if passwords match, false otherwise.
-