Package com.nimbusds.jose.jwk
Enum KeyOperation
- All Implemented Interfaces:
Serializable
,Comparable<KeyOperation>
,java.lang.constant.Constable
Enumeration of key operations. Represents the
key_ops
parameter in a
JSON Web Key (JWK).
JWK operation values:
- Version:
- 2014-04-02
- Author:
- Vladimir Dzhuvinov
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDecrypt content and validate decryption, if applicable.Derive bits not to be used as a key.Derive key.Encrypt content.Compute signature or MAC.Decrypt key and validate decryption, if applicable.Verify signature or MAC.Encrypt key. -
Method Summary
Modifier and TypeMethodDescriptionReturns the identifier of this public key use.static Set<KeyOperation>
Parses a key operation set from the specified JWKkey_ops
parameter value.toString()
static KeyOperation
Returns the enum constant of this type with the specified name.static KeyOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SIGN
Compute signature or MAC. -
VERIFY
Verify signature or MAC. -
ENCRYPT
Encrypt content. -
DECRYPT
Decrypt content and validate decryption, if applicable. -
WRAP_KEY
Encrypt key. -
UNWRAP_KEY
Decrypt key and validate decryption, if applicable. -
DERIVE_KEY
Derive key. -
DERIVE_BITS
Derive bits not to be used as a key.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
identifier
Returns the identifier of this public key use.- Returns:
- The identifier.
-
toString
- Overrides:
toString
in classEnum<KeyOperation>
- See Also:
-
parse
Parses a key operation set from the specified JWKkey_ops
parameter value.- Parameters:
sl
- The string list to parse. May benull
.- Returns:
- The key operation set,
null
if none. - Throws:
ParseException
- If the string list couldn't be parsed to a valid key operation list.
-