Class PasswordUtils

java.lang.Object
org.flasby.login2.auth.PasswordUtils

public class PasswordUtils extends Object
  • Constructor Details Link icon

    • PasswordUtils Link icon

      public PasswordUtils()
  • Method Details Link icon

    • checkPasswordStrength Link icon

      public static com.nulabinc.zxcvbn.Strength checkPasswordStrength(CharSequence plaintext)
    • generatePassword Link icon

      public static void generatePassword(PasswordUtils.PasswordInformer pi)
    • scrypt Link icon

      public static String scrypt(ZeroingString<IllegalStateException> passwd, int N, int r, int p)
      This is lifted directly from sCryptUtils but modified to take ZeroingString rather than a String as input
      Parameters:
      passwd -
      N -
      r -
      p -
      Returns:
    • check Link icon

      public static boolean check(byte[] passwd, String hashed)
      Compare the supplied plaintext password to a hashed password.
      Parameters:
      passwd - Plaintext password.
      hashed - scrypt hashed password.
      Returns:
      true if passwd matches hashed value.