Package org.passay
Class DigestHistoryRule
- java.lang.Object
-
- org.passay.HistoryRule
-
- org.passay.DigestHistoryRule
-
- All Implemented Interfaces:
Rule
public class DigestHistoryRule extends HistoryRule
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. SeePasswordData.setPasswordReferences(org.passay.PasswordData.Reference...)
.- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class org.passay.HistoryRule
ERROR_CODE, reportAllFailures
-
-
Constructor Summary
Constructors Constructor Description DigestHistoryRule(org.cryptacular.bean.HashBean<String> bean)
Creates new digest history rule which operates on password references that were digested with the supplied hash.
-
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.HistoryRule
createRuleResultDetailParameters, validate
-
-
-
-
Constructor Detail
-
DigestHistoryRule
public DigestHistoryRule(org.cryptacular.bean.HashBean<String> bean)
Creates new digest history rule which operates on password references that were digested with the supplied hash.- 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 classHistoryRule
- Parameters:
password
- candidate clear text password.reference
- reference digested password.- Returns:
- true if passwords match, false otherwise.
-
-