public abstract class DirectCryptoProvider extends Object
JWE objects
with a shared symmetric key.
Supports the following key management algorithms:
Supports the following content encryption algorithms:
Modifier and Type | Field and Description |
---|---|
static Set<JWEAlgorithm> |
SUPPORTED_ALGORITHMS
The supported JWE algorithms by the direct crypto provider class.
|
static Set<EncryptionMethod> |
SUPPORTED_ENCRYPTION_METHODS
The supported encryption methods by the direct crypto provider
class.
|
Modifier | Constructor and Description |
---|---|
protected |
DirectCryptoProvider(SecretKey cek)
Creates a new direct encryption / decryption provider.
|
Modifier and Type | Method and Description |
---|---|
JWEJCAContext |
getJCAContext()
Returns the Java Cryptography Architecture (JCA) context.
|
SecretKey |
getKey()
Gets the Content Encryption Key (CEK).
|
Set<EncryptionMethod> |
supportedEncryptionMethods()
Returns the names of the supported encryption methods by the JWE
provier.
|
Set<JWEAlgorithm> |
supportedJWEAlgorithms()
Returns the names of the supported algorithms by the JWE provider
instance.
|
public static final Set<JWEAlgorithm> SUPPORTED_ALGORITHMS
public static final Set<EncryptionMethod> SUPPORTED_ENCRYPTION_METHODS
protected DirectCryptoProvider(SecretKey cek) throws KeyLengthException
cek
- The Content Encryption Key (CEK). Must be 128 bits (16
bytes), 192 bits (24 bytes), 256 bits (32 bytes), 384
bits (48 bytes) or 512 bits (64 bytes) long. Must not be
null
.KeyLengthException
- If the CEK length is not compatible.public Set<JWEAlgorithm> supportedJWEAlgorithms()
JWEProvider
alg
JWE header parameter.supportedJWEAlgorithms
in interface JWEProvider
public Set<EncryptionMethod> supportedEncryptionMethods()
JWEProvider
enc
JWE header parameter.supportedEncryptionMethods
in interface JWEProvider
public JWEJCAContext getJCAContext()
JCAAware
getJCAContext
in interface JCAAware<JWEJCAContext>
null
.Copyright © 2021 Connect2id Ltd.. All rights reserved.