Module crypt.api

Enum MessageDigestAlgorithm

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      MD2
      The enum constant for MD2 algorithm
      MD5
      The enum constant for MD5 algorithm
      SHA_1
      The enum constant for SHA-1 algorithm
      SHA_256
      The enum constant for SHA-256 algorithm
      SHA_384
      The enum constant for SHA-384 algorithm
      SHA_512_224
      The enum constant for SHA-512/224 algorithm
      SHA_512_256
      The enum constant for SHA-512/256 algorithm
      SHA3_224
      The enum constant for SHA3-224 algorithm
      SHA3_256
      The enum constant for SHA3-256 algorithm
      SHA3_384
      The enum constant for SHA3-384 algorithm
      SHA3_512
      The enum constant for SHA3-512 algorithm
      UNKNOWN
      The enum constant 'UNKNOWN' if the MessageDigest algorithm is unknown
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()
      Gets the algorithm for encryption or decryption
      static MessageDigestAlgorithm valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MessageDigestAlgorithm[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • SHA3_224_ALGORITHM_NAME

        public static final java.lang.String SHA3_224_ALGORITHM_NAME
        The string constant SHA3_224_ALGORITHM_NAME
        See Also:
        Constant Field Values
      • SHA3_256_ALGORITHM_NAME

        public static final java.lang.String SHA3_256_ALGORITHM_NAME
        The string constant SHA3_256_ALGORITHM_NAME
        See Also:
        Constant Field Values
      • SHA3_384_ALGORITHM_NAME

        public static final java.lang.String SHA3_384_ALGORITHM_NAME
        The string constant SHA3_384_ALGORITHM_NAME
        See Also:
        Constant Field Values
      • SHA3_512_ALGORITHM_NAME

        public static final java.lang.String SHA3_512_ALGORITHM_NAME
        The string constant SHA3_512_ALGORITHM_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static MessageDigestAlgorithm[] 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 (MessageDigestAlgorithm c : MessageDigestAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MessageDigestAlgorithm valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Gets the algorithm for encryption or decryption
        Specified by:
        getAlgorithm in interface Algorithm
        Returns:
        the algorithm