|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.password.encoder.AtlassianSHA1PasswordEncoder
public class AtlassianSHA1PasswordEncoder
The Atlassian implementation of the SHA-1 password encoder, based on the OSUser implementation. It uses the Bouncy Castle SHA-512 digest, followed by the commons-codec base64 encoding.
Note: the password String is converted to bytes using the platform encoding, to preserve the same behaviour as OSUser.
| Field Summary | |
|---|---|
static java.lang.String |
ATLASSIAN_SHA1_KEY
|
| Constructor Summary | |
|---|---|
AtlassianSHA1PasswordEncoder()
|
|
| Method Summary | |
|---|---|
java.lang.String |
encodePassword(java.lang.String password,
java.lang.Object salt)
This method will handle the hashing of the passed in password param |
java.lang.String |
getKey()
The key to define this password encoder |
boolean |
isPasswordValid(java.lang.String encPass,
java.lang.String rawPass,
java.lang.Object salt)
Validates a specified "raw" password against an encoded password. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATLASSIAN_SHA1_KEY
| Constructor Detail |
|---|
public AtlassianSHA1PasswordEncoder()
| Method Detail |
|---|
public java.lang.String encodePassword(java.lang.String password,
java.lang.Object salt)
password param
encodePassword in interface PasswordEncoderpassword - the password to encryptsalt - can be null, and is not currently used by the underlying implementation
public boolean isPasswordValid(java.lang.String encPass,
java.lang.String rawPass,
java.lang.Object salt)
PasswordEncoderValidates a specified "raw" password against an encoded password.
The encoded password should have previously been generated by PasswordEncoder.encodePassword(String,
Object). This method will encode the rawPass (using the optional salt), and then
compared it with the presented encPass.
For a discussion of salts, please refer to PasswordEncoder.encodePassword(String, Object).
isPasswordValid in interface PasswordEncoderencPass - a pre-encoded passwordrawPass - a raw password to encode and compare against the pre-encoded passwordsalt - optionally used by the implementation to "salt" the raw password before encoding. A
null value is legal.
PasswordEncoder.isPasswordValid(String, String, Object)public java.lang.String getKey()
PasswordEncoder
getKey in interface PasswordEncoder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||