Package edu.iu.crypt

Enum Class WebKey.Algorithm

java.lang.Object
java.lang.Enum<WebKey.Algorithm>
edu.iu.crypt.WebKey.Algorithm
All Implemented Interfaces:
Serializable, Comparable<WebKey.Algorithm>, Constable
Enclosing interface:
WebKey

public static enum WebKey.Algorithm extends Enum<WebKey.Algorithm>
Enumerates supported signature and encryption algorithms.
  • Enum Constant Details

  • Field Details

    • alg

      public final String alg
      JSON alg attribute value.
    • algorithm

      public final String algorithm
      JCE signature or key agreement algorithm name.
    • size

      public final int size
      Encryption key or signature hash size.
    • type

      public final WebKey.Type[] type
      Key type associated with this algorithm.
    • use

      public final WebKey.Use use
      Key usage associated with this algorithm.
    • keyOps

      public final WebKey.Operation[] keyOps
      Key usage associated with this algorithm.
    • encryptionParams

      public final Set<WebCryptoHeader.Param> encryptionParams
      Set of encryption parameters used by this algorithm.
  • Method Details

    • values

      public static WebKey.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 WebKey.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
    • from

      public static WebKey.Algorithm from(String alg)
      Gets the value equivalent to the JWK alg attribute.
      Parameters:
      alg - alg attribute value
      Returns:
      WebKey.Operation