public final class KeyUse extends Object implements Serializable
use parameter in a
JSON Web Key (JWK).
Public JWK use values:
| Modifier and Type | Field and Description |
|---|---|
static KeyUse |
ENCRYPTION
Encryption.
|
static KeyUse |
SIGNATURE
Signature.
|
| Constructor and Description |
|---|
KeyUse(String identifier)
Creates a new public key use with the specified identifier.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static KeyUse |
from(X509Certificate cert)
Infers the public key use of the specified X.509 certificate.
|
String |
getValue() |
int |
hashCode() |
String |
identifier()
Returns the identifier of this public key use.
|
static KeyUse |
parse(String s)
Parses a public key use from the specified JWK
use parameter
value. |
String |
toString() |
public static final KeyUse ENCRYPTION
public String identifier()
public String getValue()
identifier()public String toString()
toString in class Objectidentifier()public static KeyUse parse(String s) throws ParseException
use parameter
value.s - The string to parse. May be null.null if none.ParseException - If the string couldn't be parsed to a valid
public key use.public static KeyUse from(X509Certificate cert)
cert - The X.509 certificate. Must not be null.null if the key use couldn't be
reliably determined.Copyright © 2021 Connect2id Ltd.. All rights reserved.