Package org.passay
Class DigestSourceRule
- java.lang.Object
-
- org.passay.SourceRule
-
- org.passay.DigestSourceRule
-
- All Implemented Interfaces:
Rule
public class DigestSourceRule extends SourceRule
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. SeePasswordData.setPasswordReferences(org.passay.PasswordData.Reference...)
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class org.passay.SourceRule
ERROR_CODE, reportAllFailures
-
-
Constructor Summary
Constructors Constructor Description DigestSourceRule(org.cryptacular.bean.HashBean<String> bean)
Creates new digest source rule which operates on password references with the supplied label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
matches(String password, PasswordData.Reference reference)
Determines whether a digested password matches a reference value.void
setCharset(Charset set)
Sets the character set to use for undigested passwords.-
Methods inherited from class org.passay.SourceRule
createRuleResultDetailParameters, validate
-
-
-
-
Constructor Detail
-
DigestSourceRule
public DigestSourceRule(org.cryptacular.bean.HashBean<String> bean)
Creates new digest source rule which operates on password references with the supplied label.- Parameters:
bean
- encoding hash bean
-
-
Method Detail
-
setCharset
public void setCharset(Charset set)
Sets the character set to use for undigested passwords.- Parameters:
set
- to use for undigested passwords
-
matches
protected boolean matches(String password, PasswordData.Reference reference)
Determines whether a digested password matches a reference value.- Overrides:
matches
in classSourceRule
- Parameters:
password
- candidate clear text password.reference
- reference digested password.- Returns:
- true if passwords match, false otherwise.
-
-