Package org.passay.rule
Class DigestSourceRule
java.lang.Object
org.passay.rule.SourceRule
org.passay.rule.DigestSourceRule
- All Implemented Interfaces:
Rule
Rule for determining if a password matches a digested password from a different source. Useful for when separate
systems cannot have matching passwords. 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.SourceRule
ERROR_CODE, reportAllFailures -
Constructor Summary
ConstructorsConstructorDescriptionDigestSourceRule(org.cryptacular.bean.HashBean<CharSequence> bean) Creates new digest source rule which operates on password references with the supplied label.DigestSourceRule(org.cryptacular.bean.HashBean<CharSequence> bean, Charset set) Creates new digest source rule which operates on password references with the supplied label. -
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.SourceRule
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
-
DigestSourceRule
Creates new digest source rule which operates on password references with the supplied label.- Parameters:
bean- encoding hash bean
-
DigestSourceRule
Creates new digest source rule which operates on password references with the supplied label.- Parameters:
bean- encoding hash beanset- to use for undigested passwords
-
-
Method Details
-
matches
Determines whether a digested password matches a reference value.- Overrides:
matchesin classSourceRule- Parameters:
password- candidate clear text password.reference- reference digested password.- Returns:
- true if passwords match, false otherwise.
-