Class SHA1PasswordEncoder

java.lang.Object
de.hybris.platform.persistence.security.SHA1PasswordEncoder
All Implemented Interfaces:
PasswordEncoder, Serializable

@Deprecated(since="ages", forRemoval=true) public class SHA1PasswordEncoder extends Object implements PasswordEncoder
Deprecated, for removal: This API element is subject to removal in a future version.
since ages
CAUTION: SHA-1 is broken !!!!
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    check(String uid, String encoded, String plain)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if the encoded password (from the user, from the database) and the plain password (from the login screen) matches.
    decode(String encoded)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Decode the given encoded password.
    encode(String uid, String plain)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the encoded password string based on the implementation of this interface and by the given plain password.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SHA1PasswordEncoder

      public SHA1PasswordEncoder()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • calculateSHA1

      protected String calculateSHA1(String plain)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • encode

      public String encode(String uid, String plain)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PasswordEncoder
      Returns the encoded password string based on the implementation of this interface and by the given plain password. The uid can be used as additional salt (see SaltedMD5PasswordEncoder).
      Specified by:
      encode in interface PasswordEncoder
      Parameters:
      uid - mostly userID, mostly not used
      plain - the plain password
      Returns:
      the encoded password
      See Also:
    • check

      public boolean check(String uid, String encoded, String plain)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PasswordEncoder
      Checks if the encoded password (from the user, from the database) and the plain password (from the login screen) matches.
      Specified by:
      check in interface PasswordEncoder
      Parameters:
      uid - mostly the user ID and mostly not used. For MD5 used as salt.
      encoded - the encoded password
      plain - the plain text password
      Returns:
      true if they match, false otherwise.
      See Also:
    • decode

      public String decode(String encoded) throws EJBCannotDecodePasswordException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: PasswordEncoder
      Decode the given encoded password. Throws exception if this is not possible.
      Specified by:
      decode in interface PasswordEncoder
      Parameters:
      encoded - the encoded password
      Returns:
      the decoded password
      Throws:
      EJBCannotDecodePasswordException - if the password cannot be decoded. (MD5 passwords cannot be decoded)
      See Also: