|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PasswordEncoder
Interface for performing one-way encryption and authenticity validation on a password.
Method Summary | |
---|---|
String |
encodePassword(String rawPass)
Encodes the specified raw password with an implementation specific algorithm. |
boolean |
isPasswordValid(String encPass,
String rawPass)
Validates a specified "raw" password against an encoded password. |
Method Detail |
---|
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 passwordboolean isPasswordValid(String encPass, String rawPass) throws EncodingException
The encoded password should have previously been generated by encodePassword(String)
. This method will encode the rawPass
, and then compare it with the presented
encPass
.
encPass
- a pre-encoded passwordrawPass
- a raw password to encode and compare against the pre-encoded password
EncodingException
- if couldn't encode the raw password (see
encodePassword(String)
)
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |