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.PrecedenceNested 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 NamedKeyInfoGeneratorManagerManager 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 NamedKeyInfoGeneratorManagerManager for named KeyInfoGenerator instances for encrypting keys.private KeyTransportAlgorithmPredicateKey transport algorithm predicate.private final org.slf4j.LoggerClass logger.private RSAOAEPParametersRSA OAEP parameters.private booleanFlag 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 ofKeyAgreementEncryptionConfigurationinstances.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.booleanFlag indicating whether to merge this configuration'sRSAOAEPParametersvalues with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative.voidsetDataEncryptionAlgorithms(List<String> algorithms) Set the data encryption algorithms to use.voidsetDataEncryptionCredentials(List<Credential> credentials) Set the data encryption credentials to use.voidsetDataKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances encrypting data.voidSet the map ofKeyAgreementEncryptionConfigurationinstances.voidSet the instance ofKeyTransportAlgorithmPredicate.voidsetKeyTransportEncryptionAlgorithms(List<String> algorithms) Set the key transport encryption algorithms to use.voidsetKeyTransportEncryptionCredentials(List<Credential> credentials) Set the key transport encryption credentials to use.voidsetKeyTransportKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances for encrypting keys.voidSet the instance ofRSAOAEPParameters.voidsetRSAOAEPParametersMerge(boolean flag) Set the flag indicating whether to merge this configuration'sRSAOAEPParametersvalues 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, setWhitelistMergeMethods inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
getExcludedAlgorithms, getIncludedAlgorithms, getIncludeExcludePrecedence, isExcludeMerge, isIncludeMerge, setExcludedAlgorithms, setExcludeMerge, setIncludedAlgorithms, setIncludeExcludePrecedence, setIncludeMergeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration
getExcludedAlgorithms, getIncludedAlgorithms, getIncludeExcludePrecedence, isExcludeMerge, isIncludeMergeMethods 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:
getDataEncryptionCredentialsin 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:
getDataEncryptionAlgorithmsin 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:
getKeyTransportEncryptionCredentialsin 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:
getKeyTransportEncryptionAlgorithmsin 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:
getDataKeyInfoGeneratorManagerin 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:
getKeyTransportKeyInfoGeneratorManagerin 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:
getRSAOAEPParametersin 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'sRSAOAEPParametersvalues with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative..Defaults to:
true- Specified by:
isRSAOAEPParametersMergein interfaceEncryptionConfiguration- Returns:
- true if should merge, false otherwise
-
setRSAOAEPParametersMerge
public void setRSAOAEPParametersMerge(boolean flag) Set the flag indicating whether to merge this configuration'sRSAOAEPParametersvalues 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:
getKeyTransportAlgorithmPredicatein interfaceEncryptionConfiguration- Returns:
- the predicate instance
-
setKeyTransportAlgorithmPredicate
Set the instance ofKeyTransportAlgorithmPredicate.- Parameters:
predicate- the new predicate instance
-
getKeyAgreementConfigurations
Get the map ofKeyAgreementEncryptionConfigurationinstances.- Specified by:
getKeyAgreementConfigurationsin interfaceEncryptionConfiguration- Returns:
- the
-
setKeyAgreementConfigurations
public void setKeyAgreementConfigurations(@Nullable Map<String, KeyAgreementEncryptionConfiguration> configs) Set the map ofKeyAgreementEncryptionConfigurationinstances.- Parameters:
configs- the new map of instances
-