Package org.forgerock.json.jose.jwk
Enum KeyOperation
- java.lang.Object
-
- java.lang.Enum<KeyOperation>
-
- org.forgerock.json.jose.jwk.KeyOperation
-
- All Implemented Interfaces:
Serializable
,Comparable<KeyOperation>
public enum KeyOperation extends Enum<KeyOperation>
Represents the Possible key operations values.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DECRYPT
Use Key to decrypt content and validate decryption, if applicable.DERIVE_BITS
Use Key to derive bits not to be used as a key.DERIVE_KEY
Use Key to derive key.ENCRYPT
Use Key to encrypt content.SIGN
Use Key to compute digital signature or MAC.UNWRAP_KEY
Use Key to decrypt key and validate decryption, if applicable.VERIFY
Use Key to verify digital signature or MAC.WRAP_KEY
Use Key to encrypt key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeyOperation
getKeyOperations(String name)
Get the KeyOperation.String
getName()
Get the Value of the KeyOperation.String
toString()
Prints the KeyOperation value.static KeyOperation
valueOf(String name)
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 Detail
-
SIGN
public static final KeyOperation SIGN
Use Key to compute digital signature or MAC.
-
VERIFY
public static final KeyOperation VERIFY
Use Key to verify digital signature or MAC.
-
ENCRYPT
public static final KeyOperation ENCRYPT
Use Key to encrypt content.
-
DECRYPT
public static final KeyOperation DECRYPT
Use Key to decrypt content and validate decryption, if applicable.
-
WRAP_KEY
public static final KeyOperation WRAP_KEY
Use Key to encrypt key.
-
UNWRAP_KEY
public static final KeyOperation UNWRAP_KEY
Use Key to decrypt key and validate decryption, if applicable.
-
DERIVE_KEY
public static final KeyOperation DERIVE_KEY
Use Key to derive key.
-
DERIVE_BITS
public static final KeyOperation DERIVE_BITS
Use Key to derive bits not to be used as a key.
-
-
Method Detail
-
values
public static KeyOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyOperation c : KeyOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyOperation valueOf(String name)
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
-
getName
public String getName()
Get the Value of the KeyOperation.- Returns:
- the KeyOperation value.
-
getKeyOperations
public static KeyOperation getKeyOperations(String name)
Get the KeyOperation. The key operation values are case-sensitive strings.- Parameters:
name
- the string representing the KeyOperation to get- Returns:
- a KeyOperation, or null if KeyOperation is null or empty
-
toString
public String toString()
Prints the KeyOperation value.- Overrides:
toString
in classEnum<KeyOperation>
- Returns:
- the KeyOperation in lowercase
-
-