Class SHA1PasswordEncoder

  • All Implemented Interfaces:
    PasswordEncoder, java.io.Serializable

    @Deprecated
    public class SHA1PasswordEncoder
    extends java.lang.Object
    implements PasswordEncoder
    Deprecated.
    since ages
    CAUTION: SHA-1 is broken !!!!
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected java.lang.String calculateSHA1​(java.lang.String plain)
      Deprecated.
       
      boolean check​(java.lang.String uid, java.lang.String encoded, java.lang.String plain)
      Deprecated.
      Checks if the encoded password (from the user, from the database) and the plain password (from the login screen) matches.
      java.lang.String decode​(java.lang.String encoded)
      Deprecated.
      Decode the given encoded password.
      java.lang.String encode​(java.lang.String uid, java.lang.String plain)
      Deprecated.
      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 Detail

      • SHA1PasswordEncoder

        public SHA1PasswordEncoder()
        Deprecated.
    • Method Detail

      • calculateSHA1

        protected java.lang.String calculateSHA1​(java.lang.String plain)
        Deprecated.
      • encode

        public java.lang.String encode​(java.lang.String uid,
                                       java.lang.String plain)
        Deprecated.
        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:
        SaltedMD5PasswordEncoder, PlainTextPasswordEncoder
      • check

        public boolean check​(java.lang.String uid,
                             java.lang.String encoded,
                             java.lang.String plain)
        Deprecated.
        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:
        MD5PasswordEncoder