构造器和说明 |
---|
PasswordKit() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
checkPassword(String plaintext,
String storedHash)
This method can be used to verify a computed hash from a plaintext (e.g. during a login
request) with that of a stored hash from a database.
|
static String |
hashPassword(String plaintext)
This method can be used to generate a string representing an account password
suitable for storing in a database.
|
public static String hashPassword(String plaintext)
plaintext
- The account's plaintext password as provided during account creation,
or when changing an account's password.public static boolean checkPassword(String plaintext, String storedHash)
plaintext
- The account's plaintext password, as provided during a login requeststoredHash
- The account's stored password hash, retrieved from the authorization databaseCopyright © 2018. All rights reserved.