Package edu.iu.crypt

Enum Class WebKey.Operation

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

public static enum WebKey.Operation extends Enum<WebKey.Operation>
Enumerates key operations.
  • Enum Constant Details

    • SIGN

      public static final WebKey.Operation SIGN
      Compute digital signature or MAC.
    • VERIFY

      public static final WebKey.Operation VERIFY
      Verify digital signature or MAC.
    • ENCRYPT

      public static final WebKey.Operation ENCRYPT
      Encrypt content.
    • DECRYPT

      public static final WebKey.Operation DECRYPT
      Decrypt content and validate decryption.
    • WRAP

      public static final WebKey.Operation WRAP
      Encrypt key.
    • UNWRAP

      public static final WebKey.Operation UNWRAP
      Decrypt key and validate decryption.
    • DERIVE_KEY

      public static final WebKey.Operation DERIVE_KEY
      Derive key.
    • DERIVE_BITS

      public static final WebKey.Operation DERIVE_BITS
      Derive bits not to be used as a key.
  • Field Details

    • keyOp

      public final String keyOp
      JSON key_ops item value
  • Method Details

    • values

      public static WebKey.Operation[] 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.Operation 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.Operation from(String keyOp)
      Gets an item value equivalent to the JWK key_ops attribute.
      Parameters:
      keyOp - key_ops item value
      Returns:
      WebKey.Operation