Enum Class Digest

java.lang.Object
java.lang.Enum<Digest>
com.artipie.rpm.Digest
All Implemented Interfaces:
Serializable, Comparable<Digest>, Constable

public enum Digest extends Enum<Digest>
Supported algorithms for hashing.
Since:
0.3.3
  • Enum Constant Details

    • SHA1

      public static final Digest SHA1
      Supported algorithm enumeration: SHA-1, SHA-256.
    • SHA256

      public static final Digest SHA256
  • Method Details

    • values

      public static Digest[] 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 Digest 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
    • messageDigest

      public MessageDigest messageDigest()
      Instantiate MessageDigest instance.
      Returns:
      MessageDigest instance
    • type

      public String type()
      Returns short algorithm name for using in RPM metadata.
      Returns:
      Digest type