public interface PasswordEncoder
|Modifier and Type||Method and Description|
Encodes the specified raw password with an implementation specific algorithm.
Validates a specified "raw" password against an encoded password.
String encodePassword(String rawPass) throws EncodingException
This will generally be a one-way message digest such as MD5 or SHA, but may also be a plaintext variant which does no encoding at all, but rather returns the same password it was fed. The latter is useful to plug in when the original password must be stored as-is.
rawPass- the password to encode
EncodingException- if couldn't encode the raw password
boolean isPasswordValid(String encPass, String rawPass) throws EncodingException
The encoded password
should have previously been generated by
encodePassword(String) . This method will
rawPass, and then compare it with the presented
Copyright © GigaSpaces.