public final class MixedCaseRule extends java.lang.Object implements PasswordRule, Scriptable
This rule counts the number of lower case letters and the number of upper case letters and returns the minimum value.
The scoring is as follows:
null or empty string ""The maximum value is half the password length if the password is made up of half upper letters and half lower case letters
| Constructor and Description |
|---|
MixedCaseRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(java.util.Map<java.lang.String,java.lang.String> config)
Configures the specified rule.
|
int |
score(java.lang.String password)
Returns the score for the password.
|
java.lang.Appendable |
toScript(java.lang.Appendable script)
Writes the script for the object on to the specified writer.
|
public int score(java.lang.String password)
PasswordRulescore in interface PasswordRulepassword - The password to evaluate.public void configure(java.util.Map<java.lang.String,java.lang.String> config)
PasswordRuleThe properties are specific to each rule.
configure in interface PasswordRuleconfig - The configuration.public java.lang.Appendable toScript(java.lang.Appendable script)
throws java.io.IOException
ScriptabletoScript in interface Scriptablescript - Where to write the script.Appendablejava.io.IOException - If an I/O error occurs