public interface JWE
Using the builder interface, a user of this API creates an object that can be used to encrypt arbitrary payloads (creating a JWE in Compact Serialization encoding) and/or to decrypt a JWE in Compact Serialization encoding and retrieve the encapsulated payload.
An instance returned by the builder can be used for multiple, possibly concurrent encryption and/or decryption operations.
Modifier and Type | Interface and Description |
---|---|
static interface |
JWE.Builder
A builder that produces a JWE operator.
|
static class |
JWE.CompressionAlgorithm
JWE content compression algorithms
|
static class |
JWE.ContentEncryptionAlgorithm
JWE content encryption algorithms.
|
static interface |
JWE.Factory
A factory that produces JWE operator instances.
|
static interface |
JWE.Header
A JWE JOSE header.
|
static class |
JWE.KeyManagementAlgorithm
JWE key management algorithms.
|
Modifier and Type | Field and Description |
---|---|
static String |
JWT
The
cty header value for JWT content (value "JWT"). |
Modifier and Type | Method and Description |
---|---|
String |
decrypt(String encoded)
Validates a JWE in Compact Serialization and extracts the encapsulated
payload.
|
String |
encrypt(String payload)
Creates a JWE in Compact Serialization encoding using the given payload.
|
static final String JWT
cty
header value for JWT content (value "JWT").String encrypt(String payload) throws JWTEncryptionException
payload
- payloadJWTEncryptionException
- if an exception occurs in performing the
encryptionString decrypt(String encoded) throws JWTEncryptionException
encoded
- JWE in Compact Serialization encodingJWTEncryptionException
- if an exception occurs in validating and
performing the decryptionCopyright © 2019. All rights reserved.