Interface PasswordEncoder
- All Known Implementing Classes:
BCryptPasswordEncoder, DelegatingPasswordEncoder, NoOpPasswordEncoder, Pbkdf2PasswordEncoder, Pbkdf2Sha256PasswordEncoder
public interface PasswordEncoder
Turns a password into what is stored, and checks a password against it.
-
Method Summary
Modifier and TypeMethodDescriptionencode(CharSequence rawPassword) The password as it should be stored: salted and hashed, so encoding one password twice gives two different results.booleanmatches(CharSequence rawPassword, String encodedPassword) WhetherrawPasswordis the passwordencodedPasswordwas made from.default booleanupgradeEncoding(String encodedPassword) WhetherencodedPasswordshould be encoded again for better protection: it was made by an older scheme, or with fewer rounds than this encoder uses now.
-
Method Details
-
encode
The password as it should be stored: salted and hashed, so encoding one password twice gives two different results. -
matches
WhetherrawPasswordis the passwordencodedPasswordwas made from. -
upgradeEncoding
WhetherencodedPasswordshould be encoded again for better protection: it was made by an older scheme, or with fewer rounds than this encoder uses now.
-