Class HashPassword


  • public class HashPassword
    extends java.lang.Object
    Password hashing toolbox
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String HASH_BASE64
      Deprecated.
      Use Globals.HASH_ALGORITHM
      static java.lang.String HASH_HEX
      Deprecated.
      Use Globals.HASH_ALGORITHM
      static java.lang.String HASH_MD5
      Deprecated.
      Use Globals.HASH_ALGORITHM
    • Method Summary

      Modifier and Type Method Description
      static java.lang.String computeHex​(byte[] input)
      Deprecated.
      Use Tool.toHex instead
      static java.lang.String hash​(java.lang.String pwd, java.lang.String encoding)
      Deprecated. 
      static java.lang.String hash​(java.lang.String pwd, java.lang.String algorithm, java.lang.String encoding)
      Hash a password
      static java.lang.String hashBase64​(java.lang.String pwd)
      Deprecated. 
      static java.lang.String hashBase64​(java.lang.String pwd, java.lang.String algorithm)
      Hash password in base64
      static java.lang.String hashHex​(java.lang.String pwd)
      Deprecated. 
      static java.lang.String hashHex​(java.lang.String pwd, java.lang.String algorithm)
      Hash password in hexadecimal
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HASH_MD5

        @Deprecated
        public static final java.lang.String HASH_MD5
        Deprecated.
        Use Globals.HASH_ALGORITHM
        See Also:
        Constant Field Values
      • HASH_HEX

        @Deprecated
        public static final java.lang.String HASH_HEX
        Deprecated.
        Use Globals.HASH_ALGORITHM
        See Also:
        Constant Field Values
      • HASH_BASE64

        @Deprecated
        public static final java.lang.String HASH_BASE64
        Deprecated.
        Use Globals.HASH_ALGORITHM
        See Also:
        Constant Field Values
    • Method Detail

      • hashBase64

        @Deprecated
        public static java.lang.String hashBase64​(java.lang.String pwd)
        Deprecated.
      • hashBase64

        public static java.lang.String hashBase64​(java.lang.String pwd,
                                                  java.lang.String algorithm)
        Hash password in base64
        Parameters:
        pwd - Password
        algorithm - Hash algorithm (one of Globals.HASH_ALGORITHM_*)
        Returns:
        hashed password
      • hashHex

        @Deprecated
        public static java.lang.String hashHex​(java.lang.String pwd)
        Deprecated.
      • hashHex

        public static java.lang.String hashHex​(java.lang.String pwd,
                                               java.lang.String algorithm)
        Hash password in hexadecimal
        Parameters:
        pwd - Password
        algorithm - Hash algorithm (one of Globals.HASH_ALGORITHM_*)
        Returns:
        hashed password
      • hash

        @Deprecated
        public static java.lang.String hash​(java.lang.String pwd,
                                            java.lang.String encoding)
        Deprecated.
      • hash

        public static java.lang.String hash​(java.lang.String pwd,
                                            java.lang.String algorithm,
                                            java.lang.String encoding)
        Hash a password
        Parameters:
        pwd - Password
        algorithm - Hash algorithm (one of Globals.HASH_ALGORITHM_*)
        encoding - Encoding (one of Globals.HASH_ENCODING_*)
        Returns:
        hashed password
      • computeHex

        @Deprecated
        public static java.lang.String computeHex​(byte[] input)
        Deprecated.
        Use Tool.toHex instead