Class AtlassianSHA1PasswordEncoder

java.lang.Object
com.atlassian.crowd.password.encoder.AtlassianSHA1PasswordEncoder
All Implemented Interfaces:
InternalPasswordEncoder, PasswordEncoder

public class AtlassianSHA1PasswordEncoder extends Object implements InternalPasswordEncoder
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 Details

  • Constructor Details

    • AtlassianSHA1PasswordEncoder

      public AtlassianSHA1PasswordEncoder()
  • Method Details

    • encodePassword

      public String encodePassword(String password, Object salt)
      This method will handle the hashing of the passed in password param
      Specified by:
      encodePassword in interface PasswordEncoder
      Parameters:
      password - the password to encrypt
      salt - can be null, and is not currently used by the underlying implementation
      Returns:
      java.util.String the hashed password
    • isPasswordValid

      public boolean isPasswordValid(String encPass, String rawPass, Object salt)
      Specified by:
      isPasswordValid in interface PasswordEncoder
      See Also:
      • org.springframework.security.providers.encoding.PasswordEncoder#isPasswordValid(String, String, Object)
    • getKey

      public String getKey()
      Specified by:
      getKey in interface PasswordEncoder