Interface PasswordStrengthCalculator


public interface PasswordStrengthCalculator
Created by gustavaaro on 2016-11-09.
  • Method Details

    • calculatePasswordSecurityLevel

      int calculatePasswordSecurityLevel​(String password)
      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

      void onPasswordAccepted​(String password)
      Is called when the password is accepted.
      Parameters:
      password - the current password.