Enum Class DigestSpec.Algorithm

java.lang.Object
java.lang.Enum<DigestSpec.Algorithm>
zeroecho.core.alg.digest.DigestSpec.Algorithm
All Implemented Interfaces:
Serializable, Comparable<DigestSpec.Algorithm>, Constable
Enclosing class:
DigestSpec

public static enum DigestSpec.Algorithm extends Enum<DigestSpec.Algorithm>
Enumeration of supported digest algorithms.

Each constant defines the JCA algorithm name and whether the variant is an extendable-output function (XOF).

Since:
1.0
  • Enum Constant Details

    • SHA_256

      public static final DigestSpec.Algorithm SHA_256
      SHA-256 digest from the SHA-2 family.
    • SHA_384

      public static final DigestSpec.Algorithm SHA_384
      SHA-384 digest from the SHA-2 family.
    • SHA_512

      public static final DigestSpec.Algorithm SHA_512
      SHA-512 digest from the SHA-2 family.
    • SHA3_256

      public static final DigestSpec.Algorithm SHA3_256
      SHA3-256 digest from the SHA-3 family.
    • SHA3_512

      public static final DigestSpec.Algorithm SHA3_512
      SHA3-512 digest from the SHA-3 family.
    • SHAKE128

      public static final DigestSpec.Algorithm SHAKE128
      SHAKE128 extendable-output function (XOF).
    • SHAKE256

      public static final DigestSpec.Algorithm SHAKE256
      SHAKE256 extendable-output function (XOF).
  • Method Details

    • values

      public static DigestSpec.Algorithm[] 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 DigestSpec.Algorithm 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
    • jca

      public String jca()
      Returns the canonical JCA algorithm name.
      Returns:
      JCA name string (e.g., "SHA-256" or "SHAKE256")
    • isXof

      public boolean isXof()
      Indicates whether this algorithm is an XOF (extendable-output function).
      Returns:
      true if this algorithm is an XOF, false otherwise