Interface PasswordStrengthCalculator
public interface PasswordStrengthCalculator
Created by gustavaaro on 2016-11-09.
-
Method Summary
Modifier and Type Method Description intcalculatePasswordSecurityLevel(String password)Calculates the current password strength.intgetMinimumLength()Defines the minimum length of a passwordvoidonPasswordAccepted(String password)Is called when the password is accepted.booleanpasswordAccepted(int level)Defines what minimum security level is required for an accepted password.
-
Method Details
-
calculatePasswordSecurityLevel
Calculates the current password strength.- Parameters:
password- the password entered by the user- Returns:
- an int in the range [0-N], where n is the number of defined security levels.
-
getMinimumLength
int getMinimumLength()Defines the minimum length of a password- Returns:
- An integer value which represents the minimum length of a password.
-
passwordAccepted
boolean passwordAccepted(int level)Defines what minimum security level is required for an accepted password.- Parameters:
level- the current security level of the password.
-
onPasswordAccepted
Is called when the password is accepted.- Parameters:
password- the current password.
-