Class AtlassianSHA1PasswordEncoder
java.lang.Object
com.atlassian.crowd.password.encoder.AtlassianSHA1PasswordEncoder
- All Implemented Interfaces:
InternalPasswordEncoder,PasswordEncoder
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodePassword(String password, Object salt) This method will handle the hashing of the passed inpasswordparamgetKey()booleanisPasswordValid(String encPass, String rawPass, Object salt)
-
Field Details
-
ATLASSIAN_SHA1_KEY
- See Also:
-
-
Constructor Details
-
AtlassianSHA1PasswordEncoder
public AtlassianSHA1PasswordEncoder()
-
-
Method Details
-
encodePassword
This method will handle the hashing of the passed inpasswordparam- Specified by:
encodePasswordin interfacePasswordEncoder- Parameters:
password- the password to encryptsalt- can be null, and is not currently used by the underlying implementation- Returns:
- java.util.String the hashed password
-
isPasswordValid
- Specified by:
isPasswordValidin interfacePasswordEncoder- See Also:
-
org.springframework.security.providers.encoding.PasswordEncoder#isPasswordValid(String, String, Object)
-
getKey
- Specified by:
getKeyin interfacePasswordEncoder
-