Package org.opensaml.xmlsec.impl
Class BasicEncryptionConfiguration
java.lang.Object
org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration
org.opensaml.xmlsec.impl.BasicEncryptionConfiguration
- All Implemented Interfaces:
AlgorithmPolicyConfiguration,EncryptionConfiguration
public class BasicEncryptionConfiguration
extends BasicAlgorithmPolicyConfiguration
implements EncryptionConfiguration
Basic implementation of
EncryptionConfiguration.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensaml.xmlsec.AlgorithmPolicyConfiguration
AlgorithmPolicyConfiguration.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 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.setDataEncryptionAlgorithms(List<String> algorithms) Set the data encryption algorithms to use.setDataEncryptionCredentials(List<Credential> credentials) Set the data encryption credentials to use.setDataKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances encrypting data.Set the map ofKeyAgreementEncryptionConfigurationinstances.Set the instance ofKeyTransportAlgorithmPredicate.setKeyTransportEncryptionAlgorithms(List<String> algorithms) Set the key transport encryption algorithms to use.setKeyTransportEncryptionCredentials(List<Credential> credentials) Set the key transport encryption credentials to use.setKeyTransportKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances for encrypting keys.Set the instance ofRSAOAEPParameters.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.Methods 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, isIncludeMerge
-
Field Details
-
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
Key agreement configurations.
-
-
Constructor Details
-
BasicEncryptionConfiguration
public BasicEncryptionConfiguration()Constructor.
-
-
Method Details
-
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
@Nonnull public BasicEncryptionConfiguration setDataEncryptionCredentials(@Nullable List<Credential> credentials) Set the data encryption credentials to use.- Parameters:
credentials- the list of data encryption credentials- Returns:
- this object
-
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
@Nonnull public BasicEncryptionConfiguration setDataEncryptionAlgorithms(@Nullable List<String> algorithms) Set the data encryption algorithms to use.- Parameters:
algorithms- the list of algorithms- Returns:
- this object
-
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
@Nonnull public BasicEncryptionConfiguration setKeyTransportEncryptionCredentials(@Nullable List<Credential> credentials) Set the key transport encryption credentials to use.- Parameters:
credentials- the list of key transport encryption credentials- Returns:
- this object
-
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
@Nonnull public BasicEncryptionConfiguration setKeyTransportEncryptionAlgorithms(@Nullable List<String> algorithms) Set the key transport encryption algorithms to use.- Parameters:
algorithms- the list of algorithms- Returns:
- this object
-
getDataKeyInfoGeneratorManager
Get the KeyInfoGenerator manager to use when generating the EncryptedData/KeyInfo.- Specified by:
getDataKeyInfoGeneratorManagerin interfaceEncryptionConfiguration- Returns:
- the KeyInfoGenerator manager instance
-
setDataKeyInfoGeneratorManager
@Nonnull public BasicEncryptionConfiguration setDataKeyInfoGeneratorManager(@Nullable NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances encrypting data.- Parameters:
keyInfoManager- the KeyInfoGenerator manager to use- Returns:
- this object
-
getKeyTransportKeyInfoGeneratorManager
Get the KeyInfoGenerator manager to use when generating the EncryptedKey/KeyInfo.- Specified by:
getKeyTransportKeyInfoGeneratorManagerin interfaceEncryptionConfiguration- Returns:
- the KeyInfoGenerator manager instance
-
setKeyTransportKeyInfoGeneratorManager
@Nonnull public BasicEncryptionConfiguration setKeyTransportKeyInfoGeneratorManager(@Nullable NamedKeyInfoGeneratorManager keyInfoManager) Set the manager for named KeyInfoGenerator instances for encrypting keys.- Parameters:
keyInfoManager- the KeyInfoGenerator manager to use- Returns:
- this object
-
getRSAOAEPParameters
Get the instance ofRSAOAEPParameters.- Specified by:
getRSAOAEPParametersin interfaceEncryptionConfiguration- Returns:
- the parameters instance
-
setRSAOAEPParameters
@Nonnull public BasicEncryptionConfiguration setRSAOAEPParameters(@Nullable RSAOAEPParameters params) Set the instance ofRSAOAEPParameters.- Parameters:
params- the new parameters instance- Returns:
- this object
-
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
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- Returns:
- this object
-
getKeyTransportAlgorithmPredicate
Get the instance ofKeyTransportAlgorithmPredicate.- Specified by:
getKeyTransportAlgorithmPredicatein interfaceEncryptionConfiguration- Returns:
- the predicate instance
-
setKeyTransportAlgorithmPredicate
@Nonnull public BasicEncryptionConfiguration setKeyTransportAlgorithmPredicate(@Nullable KeyTransportAlgorithmPredicate predicate) Set the instance ofKeyTransportAlgorithmPredicate.- Parameters:
predicate- the new predicate instance- Returns:
- this object
-
getKeyAgreementConfigurations
@Nonnull @Unmodifiable @NotLive public Map<String,KeyAgreementEncryptionConfiguration> getKeyAgreementConfigurations()Get the map ofKeyAgreementEncryptionConfigurationinstances.- Specified by:
getKeyAgreementConfigurationsin interfaceEncryptionConfiguration- Returns:
- the
-
setKeyAgreementConfigurations
@Nonnull public BasicEncryptionConfiguration setKeyAgreementConfigurations(@Nullable Map<String, KeyAgreementEncryptionConfiguration> configs) Set the map ofKeyAgreementEncryptionConfigurationinstances.- Parameters:
configs- the new map of instances- Returns:
- this object
-