Package org.flasby.login2.auth
Class PasswordUtils
java.lang.Object
org.flasby.login2.auth.PasswordUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Compare the supplied plaintext password to a hashed password.static com.nulabinc.zxcvbn.Strength
checkPasswordStrength
(CharSequence plaintext) static void
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
-
Constructor Details
-
Method Details
-
checkPasswordStrength
-
generatePassword
-
scrypt
This is lifted directly from sCryptUtils but modified to take ZeroingString rather than a String as input- Parameters:
passwd
-N
-r
-p
-- Returns:
-
check
Compare the supplied plaintext password to a hashed password.- Parameters:
passwd
- Plaintext password.hashed
- scrypt hashed password.- Returns:
- true if passwd matches hashed value.
-