Module crypt.api

Enum Class MdAlgorithm

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

public enum MdAlgorithm extends Enum<MdAlgorithm> implements Algorithm
The enum MdAlgorithm defines the MessageDigest algorithm.
  • Enum Constant Details

    • MD2

      public static final MdAlgorithm MD2
      The enum constant for MD2 algorithm.
    • MD4

      public static final MdAlgorithm MD4
      The enum constant for MD4 algorithm.
    • MD5

      public static final MdAlgorithm MD5
      The enum constant for MD5 algorithm.
    • UNKNOWN

      public static final MdAlgorithm UNKNOWN
      The enum constant 'UNKNOWN' if the MessageDigest algorithm is unknown
  • Field Details

  • Method Details

    • values

      public static MdAlgorithm[] 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 MdAlgorithm 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