Module crypt.api

Enum Class MessageDigestAlgorithm

java.lang.Object
java.lang.Enum<MessageDigestAlgorithm>
io.github.astrapi69.crypt.api.algorithm.MessageDigestAlgorithm
All Implemented Interfaces:
Algorithm, Serializable, Comparable<MessageDigestAlgorithm>, Constable

public enum MessageDigestAlgorithm extends Enum<MessageDigestAlgorithm> implements Algorithm
The enum MessageDigestAlgorithm provides all the algorithm names that can be specified when generating an instance of MessageDigest. For more info see: https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#messagedigest-algorithms
  • Enum Constant Details

  • Field Details

    • SHA3_224_ALGORITHM_NAME

      public static final String SHA3_224_ALGORITHM_NAME
      The string constant SHA3_224_ALGORITHM_NAME
      See Also:
    • SHA3_256_ALGORITHM_NAME

      public static final String SHA3_256_ALGORITHM_NAME
      The string constant SHA3_256_ALGORITHM_NAME
      See Also:
    • SHA3_384_ALGORITHM_NAME

      public static final String SHA3_384_ALGORITHM_NAME
      The string constant SHA3_384_ALGORITHM_NAME
      See Also:
    • SHA3_512_ALGORITHM_NAME

      public static final String SHA3_512_ALGORITHM_NAME
      The string constant SHA3_512_ALGORITHM_NAME
      See Also:
  • Method Details

    • values

      public static MessageDigestAlgorithm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MessageDigestAlgorithm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAlgorithm

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