public enum KeyOperation extends Enum<KeyOperation>
key_ops
parameter in a
JSON Web Key (JWK).
JWK operation values:
Enum Constant and Description |
---|
DECRYPT
Decrypt content and validate decryption, if applicable.
|
DERIVE_BITS
Derive bits not to be used as a key.
|
DERIVE_KEY
Derive key.
|
ENCRYPT
Encrypt content.
|
SIGN
Compute signature or MAC.
|
UNWRAP_KEY
Decrypt key and validate decryption, if applicable.
|
VERIFY
Verify signature or MAC.
|
WRAP_KEY
Encrypt key.
|
Modifier and Type | Method and Description |
---|---|
String |
identifier()
Returns the identifier of this public key use.
|
static Set<KeyOperation> |
parse(List<String> sl)
Parses a key operation set from the specified JWK
key_ops
parameter value. |
String |
toString() |
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.
|
public static final KeyOperation SIGN
public static final KeyOperation VERIFY
public static final KeyOperation ENCRYPT
public static final KeyOperation DECRYPT
public static final KeyOperation WRAP_KEY
public static final KeyOperation UNWRAP_KEY
public static final KeyOperation DERIVE_KEY
public static final KeyOperation DERIVE_BITS
public static KeyOperation[] values()
for (KeyOperation c : KeyOperation.values()) System.out.println(c);
public static KeyOperation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String identifier()
public String toString()
toString
in class Enum<KeyOperation>
identifier()
public static Set<KeyOperation> parse(List<String> sl) throws ParseException
key_ops
parameter value.sl
- The string list to parse. May be null
.null
if none.ParseException
- If the string list couldn't be parsed to a
valid key operation list.Copyright © 2017 Connect2id Ltd.. All rights reserved.