Package org.opensaml.xmlsec.impl
Class BasicEncryptionConfiguration
java.lang.Object
org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
org.opensaml.xmlsec.impl.BasicWhitelistBlacklistConfiguration
org.opensaml.xmlsec.impl.BasicEncryptionConfiguration
- All Implemented Interfaces:
AlgorithmPolicyConfiguration
,EncryptionConfiguration
,WhitelistBlacklistConfiguration
public class BasicEncryptionConfiguration
extends BasicWhitelistBlacklistConfiguration
implements EncryptionConfiguration
Basic implementation of
EncryptionConfiguration
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration
AlgorithmPolicyConfiguration.Precedence
Nested classes/interfaces inherited from interface org.opensaml.xmlsec.WhitelistBlacklistConfiguration
WhitelistBlacklistConfiguration.Precedence
-
Field Summary
FieldsModifier and TypeFieldDescriptionData encryption algorithm URIs.private List<Credential>
Data encryption credentials.private NamedKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances for encrypting data.private Map<String,
KeyAgreementEncryptionConfiguration> Key agreement configurations.Key transport encryption algorithm URIs.private List<Credential>
Key transport encryption credentials.private NamedKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances for encrypting keys.private KeyTransportAlgorithmPredicate
Key transport algorithm predicate.private final org.slf4j.Logger
Class logger.private RSAOAEPParameters
RSA OAEP parameters.private boolean
Flag whether to merge RSA OAEP parameters.Fields inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
DEFAULT_PRECEDENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the list of preferred data encryption algorithm URIs, in preference order.Get the list of data encryption credentials to use, in preference order.Get the KeyInfoGenerator manager to use when generating the EncryptedData/KeyInfo.Get the map ofKeyAgreementEncryptionConfiguration
instances.Get the instance ofKeyTransportAlgorithmPredicate
.Get the list of preferred key transport encryption algorithm URIs, in preference order.Get the list of key transport encryption credentials to use, in preference order.Get the KeyInfoGenerator manager to use when generating the EncryptedKey/KeyInfo.Get the instance ofRSAOAEPParameters
.boolean
Flag indicating whether to merge this configuration'sRSAOAEPParameters
values with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative.void
setDataEncryptionAlgorithms
(List<String> algorithms) Set the data encryption algorithms to use.void
setDataEncryptionCredentials
(List<Credential> credentials) Set the data encryption credentials to use.void
setDataKeyInfoGeneratorManager
(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances encrypting data.void
Set the map ofKeyAgreementEncryptionConfiguration
instances.void
Set the instance ofKeyTransportAlgorithmPredicate
.void
setKeyTransportEncryptionAlgorithms
(List<String> algorithms) Set the key transport encryption algorithms to use.void
setKeyTransportEncryptionCredentials
(List<Credential> credentials) Set the key transport encryption credentials to use.void
setKeyTransportKeyInfoGeneratorManager
(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances for encrypting keys.void
Set the instance ofRSAOAEPParameters
.void
setRSAOAEPParametersMerge
(boolean flag) Set the flag indicating whether to merge this configuration'sRSAOAEPParameters
values with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative.Methods inherited from class org.opensaml.xmlsec.impl.BasicWhitelistBlacklistConfiguration
getBlacklistedAlgorithms, getWhitelistBlacklistPrecedence, getWhitelistedAlgorithms, isBlacklistMerge, isWhitelistMerge, setBlacklistedAlgorithms, setBlacklistMerge, setWhitelistBlacklistPrecedence, setWhitelistedAlgorithms, setWhitelistMerge
Methods inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
getExcludedAlgorithms, getIncludedAlgorithms, getIncludeExcludePrecedence, isExcludeMerge, isIncludeMerge, setExcludedAlgorithms, setExcludeMerge, setIncludedAlgorithms, setIncludeExcludePrecedence, setIncludeMerge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration
getExcludedAlgorithms, getIncludedAlgorithms, getIncludeExcludePrecedence, isExcludeMerge, isIncludeMerge
Methods inherited from interface org.opensaml.xmlsec.WhitelistBlacklistConfiguration
getBlacklistedAlgorithms, getWhitelistBlacklistPrecedence, getWhitelistedAlgorithms, isBlacklistMerge, isWhitelistMerge
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
dataEncryptionCredentials
Data encryption credentials. -
dataEncryptionAlgorithms
Data encryption algorithm URIs. -
keyTransportEncryptionCredentials
Key transport encryption credentials. -
keyTransportEncryptionAlgorithms
Key transport encryption algorithm URIs. -
dataKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances for encrypting data. -
keyTransportKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances for encrypting keys. -
rsaOAEPParameters
RSA OAEP parameters. -
rsaOAEPParametersMerge
private boolean rsaOAEPParametersMergeFlag whether to merge RSA OAEP parameters. -
keyTransportPredicate
Key transport algorithm predicate. -
keyAgreementConfigurations
@Nonnull @NonnullElements private Map<String,KeyAgreementEncryptionConfiguration> keyAgreementConfigurationsKey agreement configurations.
-
-
Constructor Details
-
BasicEncryptionConfiguration
public BasicEncryptionConfiguration()Constructor.
-
-
Method Details
-
getDataEncryptionCredentials
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<Credential> getDataEncryptionCredentials()Get the list of data encryption credentials to use, in preference order.- Specified by:
getDataEncryptionCredentials
in interfaceEncryptionConfiguration
- Returns:
- the list of encryption credentials, may be empty
-
setDataEncryptionCredentials
Set the data encryption credentials to use.- Parameters:
credentials
- the list of data encryption credentials
-
getDataEncryptionAlgorithms
Get the list of preferred data encryption algorithm URIs, in preference order.- Specified by:
getDataEncryptionAlgorithms
in interfaceEncryptionConfiguration
- Returns:
- the list of algorithm URIs, may be empty
-
setDataEncryptionAlgorithms
Set the data encryption algorithms to use.- Parameters:
algorithms
- the list of algorithms
-
getKeyTransportEncryptionCredentials
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<Credential> getKeyTransportEncryptionCredentials()Get the list of key transport encryption credentials to use, in preference order.- Specified by:
getKeyTransportEncryptionCredentials
in interfaceEncryptionConfiguration
- Returns:
- the list of encryption credentials, may be empty
-
setKeyTransportEncryptionCredentials
public void setKeyTransportEncryptionCredentials(@Nullable @NonnullElements List<Credential> credentials) Set the key transport encryption credentials to use.- Parameters:
credentials
- the list of key transport encryption credentials
-
getKeyTransportEncryptionAlgorithms
@Nonnull @NonnullElements @Unmodifiable @NotLive public List<String> getKeyTransportEncryptionAlgorithms()Get the list of preferred key transport encryption algorithm URIs, in preference order.- Specified by:
getKeyTransportEncryptionAlgorithms
in interfaceEncryptionConfiguration
- Returns:
- the list of algorithm URIs, may be empty
-
setKeyTransportEncryptionAlgorithms
Set the key transport encryption algorithms to use.- Parameters:
algorithms
- the list of algorithms
-
getDataKeyInfoGeneratorManager
Get the KeyInfoGenerator manager to use when generating the EncryptedData/KeyInfo.- Specified by:
getDataKeyInfoGeneratorManager
in interfaceEncryptionConfiguration
- Returns:
- the KeyInfoGenerator manager instance
-
setDataKeyInfoGeneratorManager
Set the manager for named KeyInfoGenerator instances encrypting data.- Parameters:
keyInfoManager
- the KeyInfoGenerator manager to use
-
getKeyTransportKeyInfoGeneratorManager
Get the KeyInfoGenerator manager to use when generating the EncryptedKey/KeyInfo.- Specified by:
getKeyTransportKeyInfoGeneratorManager
in interfaceEncryptionConfiguration
- Returns:
- the KeyInfoGenerator manager instance
-
setKeyTransportKeyInfoGeneratorManager
public void setKeyTransportKeyInfoGeneratorManager(@Nullable NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances for encrypting keys.- Parameters:
keyInfoManager
- the KeyInfoGenerator manager to use
-
getRSAOAEPParameters
Get the instance ofRSAOAEPParameters
.- Specified by:
getRSAOAEPParameters
in interfaceEncryptionConfiguration
- Returns:
- the parameters instance
-
setRSAOAEPParameters
Set the instance ofRSAOAEPParameters
.- Parameters:
params
- the new parameters instance
-
isRSAOAEPParametersMerge
public boolean isRSAOAEPParametersMerge()Flag indicating whether to merge this configuration'sRSAOAEPParameters
values with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative..Defaults to:
true
- Specified by:
isRSAOAEPParametersMerge
in interfaceEncryptionConfiguration
- Returns:
- true if should merge, false otherwise
-
setRSAOAEPParametersMerge
public void setRSAOAEPParametersMerge(boolean flag) Set the flag indicating whether to merge this configuration'sRSAOAEPParameters
values with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative.Defaults to:
true
- Parameters:
flag
- true if should merge, false otherwise
-
getKeyTransportAlgorithmPredicate
Get the instance ofKeyTransportAlgorithmPredicate
.- Specified by:
getKeyTransportAlgorithmPredicate
in interfaceEncryptionConfiguration
- Returns:
- the predicate instance
-
setKeyTransportAlgorithmPredicate
Set the instance ofKeyTransportAlgorithmPredicate
.- Parameters:
predicate
- the new predicate instance
-
getKeyAgreementConfigurations
Get the map ofKeyAgreementEncryptionConfiguration
instances.- Specified by:
getKeyAgreementConfigurations
in interfaceEncryptionConfiguration
- Returns:
- the
-
setKeyAgreementConfigurations
public void setKeyAgreementConfigurations(@Nullable Map<String, KeyAgreementEncryptionConfiguration> configs) Set the map ofKeyAgreementEncryptionConfiguration
instances.- Parameters:
configs
- the new map of instances
-