public interface PasswordHasher
PasswordHasher should encode the password in the following way:
The<algorithm>:<the hashed password including the salt>
algorithm is used to identify the implementation of the PasswordHasher.| Modifier and Type | Method and Description |
|---|---|
String |
encode(CharSequence rawPassword)
Encode the raw password using a hash algorithm and salt.
|
boolean |
matches(CharSequence rawPassword,
String encodedPassword)
Verify the encoded password the raw password after.
|
String encode(CharSequence rawPassword)
rawPassword - the raw password to encodeboolean matches(CharSequence rawPassword, String encodedPassword)
true if the passwords matches,
false if they do not.rawPassword - the raw password to encode and matchencodedPassword - the encoded password from storage to compare withtrue if the raw password matches the encoded one.Copyright © 2020. All rights reserved.