Enum HashMethod

    • Enum Constant Detail

      • PBKDF2WithHmacSHA512_65536_64

        public static final HashMethod PBKDF2WithHmacSHA512_65536_64
        PBKDF2 with HMAC SHA-512, 65536 iterations generates 64 bytes (ie. 512 bits as SHA-512 does)
    • Method Detail

      • values

        public static HashMethod[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (HashMethod c : HashMethod.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HashMethod valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • hash

        public abstract byte[] hash​(String value,
                                    byte[] salt)
        compute digest from value.If given, the value is prefixed with the salt.
        Parameters:
        value - the value to hash
        salt - optional salt
        Returns:
        digested salted value