public final class JWEJCAContext extends JCAContext
| Constructor and Description |
|---|
JWEJCAContext()
Creates a new default JCA context for JWE.
|
JWEJCAContext(Provider generalProvider,
Provider keProvider,
Provider ceProvider,
Provider macProvider,
SecureRandom randomGen)
Creates a new JCA context for JWE with the specified JCA providers
and secure random generator.
|
| Modifier and Type | Method and Description |
|---|---|
Provider |
getContentEncryptionProvider()
Gets the specific JCA provider for the content encryption.
|
Provider |
getKeyEncryptionProvider()
Gets the specific JCA provider for the key encryption.
|
Provider |
getMACProvider()
Gets the specific JCA provider for the MAC computation (where
required by the JWE encryption method).
|
void |
setContentEncryptionProvider(Provider ceProvider)
Sets a specific JCA provider for the content encryption.
|
void |
setKeyEncryptionProvider(Provider keProvider)
Sets a specific JCA provider for the key encryption.
|
void |
setMACProvider(Provider macProvider)
Sets a specific JCA provider for the MAC computation (where required
by the JWE encryption method).
|
getProvider, getSecureRandom, setProvider, setSecureRandompublic JWEJCAContext()
public JWEJCAContext(Provider generalProvider, Provider keProvider, Provider ceProvider, Provider macProvider, SecureRandom randomGen)
generalProvider - The general JCA provider to be used for all
operations where a more specific one is
absent, null to use the default
system provider.keProvider - The specific JCA provider to be used for the
key encryption, null to fall back to
the general one, and if that is not specified
to the default system provider.ceProvider - The specific JCA provider to be used for the
content encryption, null to fall back
to the general one, and if that is not
specified to the default system provider.macProvider - The specific JCA provider to be used for the
MAC computation (where required by the JWE
encryption method), null to fall back
to the general one, and if that is not
specified to the default system provider.randomGen - The specific secure random generator for the
initialisation vector and other purposes
requiring a random number, null to
use the default system one.public void setKeyEncryptionProvider(Provider keProvider)
keProvider - The specific JCA provider to be used for the key
encryption, null to fall back to the
general one, and if that is not specified to the
default system provider.public Provider getKeyEncryptionProvider()
null implies the
default system provider.public void setContentEncryptionProvider(Provider ceProvider)
ceProvider - The specific JCA provider to be used for the
content encryption, null to fall back to
the general one, and if that is not specified to
the default system provider.public Provider getContentEncryptionProvider()
null implies the
default system provider.public void setMACProvider(Provider macProvider)
macProvider - The specific JCA provider to be used for the MAC
computation (where required by the JWE encryption
method), null to fall back to the general
one, and if that is not specified to the default
system provider.public Provider getMACProvider()
null implies the
default system provider.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.