Package com.google.gerrit.server.account
Class HashedPassword
java.lang.Object
com.google.gerrit.server.account.HashedPassword
Holds logic for salted, hashed passwords. It uses BCrypt from BouncyCastle, which truncates
passwords at 72 bytes.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkPassword
(String password) static HashedPassword
decodes a hashed password encoded withencode()
.encode()
Serialize the hashed password and its parameters for persistent storage.static HashedPassword
fromPassword
(String password)
-
Method Details
-
decode
decodes a hashed password encoded withencode()
.- Throws:
HashedPassword.DecoderException
- if input is malformed.
-
fromPassword
-
encode
Serialize the hashed password and its parameters for persistent storage.- Returns:
- one-line string encoding the hash and salt.
-
checkPassword
-