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

Fields
Modifier and Type
Field
Description
`private List<String>`
`dataEncryptionAlgorithms`
Data encryption algorithm URIs.
`private List<Credential>`
`dataEncryptionCredentials`
Data encryption credentials.
`private NamedKeyInfoGeneratorManager`
`dataKeyInfoGeneratorManager`
Manager for named KeyInfoGenerator instances for encrypting data.
`private Map<String,KeyAgreementEncryptionConfiguration>`
`keyAgreementConfigurations`
Key agreement configurations.
`private List<String>`
`keyTransportEncryptionAlgorithms`
Key transport encryption algorithm URIs.
`private List<Credential>`
`keyTransportEncryptionCredentials`
Key transport encryption credentials.
`private NamedKeyInfoGeneratorManager`
`keyTransportKeyInfoGeneratorManager`
Manager for named KeyInfoGenerator instances for encrypting keys.
`private KeyTransportAlgorithmPredicate`
`keyTransportPredicate`
Key transport algorithm predicate.
`private RSAOAEPParameters`
`rsaOAEPParameters`
RSA OAEP parameters.
`private boolean`
`rsaOAEPParametersMerge`
Flag whether to merge RSA OAEP parameters.

### Fields inherited from class org.opensaml.xmlsec.impl.BasicAlgorithmPolicyConfiguration

`DEFAULT_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`BasicEncryptionConfiguration()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<String>`
`getDataEncryptionAlgorithms()`
Get the list of preferred data encryption algorithm URIs, in preference order.
`List<Credential>`
`getDataEncryptionCredentials()`
Get the list of data encryption credentials to use, in preference order.
`NamedKeyInfoGeneratorManager`
`getDataKeyInfoGeneratorManager()`
Get the KeyInfoGenerator manager to use when generating the EncryptedData/KeyInfo.
`Map<String,KeyAgreementEncryptionConfiguration>`
`getKeyAgreementConfigurations()`
Get the map of `KeyAgreementEncryptionConfiguration` instances.
`KeyTransportAlgorithmPredicate`
`getKeyTransportAlgorithmPredicate()`
Get the instance of `KeyTransportAlgorithmPredicate`.
`List<String>`
`getKeyTransportEncryptionAlgorithms()`
Get the list of preferred key transport encryption algorithm URIs, in preference order.
`List<Credential>`
`getKeyTransportEncryptionCredentials()`
Get the list of key transport encryption credentials to use, in preference order.
`NamedKeyInfoGeneratorManager`
`getKeyTransportKeyInfoGeneratorManager()`
Get the KeyInfoGenerator manager to use when generating the EncryptedKey/KeyInfo.
`RSAOAEPParameters`
`getRSAOAEPParameters()`
Get the instance of `RSAOAEPParameters`.
`boolean`
`isRSAOAEPParametersMerge()`
Flag indicating whether to merge this configuration's `RSAOAEPParameters` values with those of a lower order of precedence, or to treat this configuration's parameters set as authoritative.
`BasicEncryptionConfiguration`
`setDataEncryptionAlgorithms(List<String> algorithms)`
Set the data encryption algorithms to use.
`BasicEncryptionConfiguration`
`setDataEncryptionCredentials(List<Credential> credentials)`
Set the data encryption credentials to use.
`BasicEncryptionConfiguration`
`setDataKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager)`
Set the manager for named KeyInfoGenerator instances encrypting data.
`BasicEncryptionConfiguration`
`setKeyAgreementConfigurations(Map<String,KeyAgreementEncryptionConfiguration> configs)`
Set the map of `KeyAgreementEncryptionConfiguration` instances.
`BasicEncryptionConfiguration`
`setKeyTransportAlgorithmPredicate(KeyTransportAlgorithmPredicate predicate)`
Set the instance of `KeyTransportAlgorithmPredicate`.
`BasicEncryptionConfiguration`
`setKeyTransportEncryptionAlgorithms(List<String> algorithms)`
Set the key transport encryption algorithms to use.
`BasicEncryptionConfiguration`
`setKeyTransportEncryptionCredentials(List<Credential> credentials)`
Set the key transport encryption credentials to use.
`BasicEncryptionConfiguration`
`setKeyTransportKeyInfoGeneratorManager(NamedKeyInfoGeneratorManager keyInfoManager)`
Set the manager for named KeyInfoGenerator instances for encrypting keys.
`BasicEncryptionConfiguration`
`setRSAOAEPParameters(RSAOAEPParameters params)`
Set the instance of `RSAOAEPParameters`.
`BasicEncryptionConfiguration`
`setRSAOAEPParametersMerge(boolean flag)`
Set the flag indicating whether to merge this configuration's `RSAOAEPParameters` 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.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`

## Field Details

### dataEncryptionCredentials

@Nonnull private List<Credential> dataEncryptionCredentials
Data encryption credentials.

### dataEncryptionAlgorithms

@Nonnull private List<String> dataEncryptionAlgorithms
Data encryption algorithm URIs.

### keyTransportEncryptionCredentials

@Nonnull private List<Credential> keyTransportEncryptionCredentials
Key transport encryption credentials.

### keyTransportEncryptionAlgorithms

@Nonnull private List<String> keyTransportEncryptionAlgorithms
Key transport encryption algorithm URIs.

### dataKeyInfoGeneratorManager

@Nullable private NamedKeyInfoGeneratorManager dataKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances for encrypting data.

### keyTransportKeyInfoGeneratorManager

@Nullable private NamedKeyInfoGeneratorManager keyTransportKeyInfoGeneratorManager
Manager for named KeyInfoGenerator instances for encrypting keys.

### rsaOAEPParameters

@Nullable private RSAOAEPParameters rsaOAEPParameters
RSA OAEP parameters.

### rsaOAEPParametersMerge

private boolean rsaOAEPParametersMerge
Flag whether to merge RSA OAEP parameters.

### keyTransportPredicate

@Nullable private KeyTransportAlgorithmPredicate keyTransportPredicate
Key transport algorithm predicate.

### keyAgreementConfigurations

@Nonnull private Map<String,KeyAgreementEncryptionConfiguration> keyAgreementConfigurations
Key agreement configurations.

## Constructor Details

### BasicEncryptionConfiguration

public BasicEncryptionConfiguration()
Constructor.

## Method Details

### getDataEncryptionCredentials

@Nonnull @Unmodifiable @NotLive public List<Credential> getDataEncryptionCredentials()
Get the list of data encryption credentials to use, in preference order.

Specified by:
  `getDataEncryptionCredentials` in interface `EncryptionConfiguration`
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

@Nonnull @Unmodifiable @NotLive public List<String> getDataEncryptionAlgorithms()
Get the list of preferred data encryption algorithm URIs, in preference order.

Specified by:
  `getDataEncryptionAlgorithms` in interface `EncryptionConfiguration`
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

@Nonnull @Unmodifiable @NotLive public List<Credential> getKeyTransportEncryptionCredentials()
Get the list of key transport encryption credentials to use, in preference order.

Specified by:
  `getKeyTransportEncryptionCredentials` in interface `EncryptionConfiguration`
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

@Nonnull @Unmodifiable @NotLive public List<String> getKeyTransportEncryptionAlgorithms()
Get the list of preferred key transport encryption algorithm URIs, in preference order.

Specified by:
  `getKeyTransportEncryptionAlgorithms` in interface `EncryptionConfiguration`
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

@Nullable public NamedKeyInfoGeneratorManager getDataKeyInfoGeneratorManager()
Get the KeyInfoGenerator manager to use when generating the EncryptedData/KeyInfo.

Specified by:
  `getDataKeyInfoGeneratorManager` in interface `EncryptionConfiguration`
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

@Nullable public NamedKeyInfoGeneratorManager getKeyTransportKeyInfoGeneratorManager()
Get the KeyInfoGenerator manager to use when generating the EncryptedKey/KeyInfo.

Specified by:
  `getKeyTransportKeyInfoGeneratorManager` in interface `EncryptionConfiguration`
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

@Nullable public RSAOAEPParameters getRSAOAEPParameters()
Get the instance of `RSAOAEPParameters`.

Specified by:
  `getRSAOAEPParameters` in interface `EncryptionConfiguration`
Returns:
  the parameters instance

### setRSAOAEPParameters

@Nonnull public BasicEncryptionConfiguration setRSAOAEPParameters(@Nullable RSAOAEPParameters params)
Set the instance of `RSAOAEPParameters`.

Parameters:
  `params` - the new parameters instance
Returns:
  this object

### isRSAOAEPParametersMerge

public boolean isRSAOAEPParametersMerge()
Flag indicating whether to merge this configuration's `RSAOAEPParameters` 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 interface `EncryptionConfiguration`
Returns:
  true if should merge, false otherwise

### setRSAOAEPParametersMerge

@Nonnull public BasicEncryptionConfiguration setRSAOAEPParametersMerge(boolean flag)
Set the flag indicating whether to merge this configuration's `RSAOAEPParameters` 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
Returns:
  this object

### getKeyTransportAlgorithmPredicate

@Nullable public KeyTransportAlgorithmPredicate getKeyTransportAlgorithmPredicate()
Get the instance of `KeyTransportAlgorithmPredicate`.

Specified by:
  `getKeyTransportAlgorithmPredicate` in interface `EncryptionConfiguration`
Returns:
  the predicate instance

### setKeyTransportAlgorithmPredicate

@Nonnull public BasicEncryptionConfiguration setKeyTransportAlgorithmPredicate(@Nullable KeyTransportAlgorithmPredicate predicate)
Set the instance of `KeyTransportAlgorithmPredicate`.

Parameters:
  `predicate` - the new predicate instance
Returns:
  this object

### getKeyAgreementConfigurations

@Nonnull @Unmodifiable @NotLive public Map<String,KeyAgreementEncryptionConfiguration> getKeyAgreementConfigurations()
Get the map of `KeyAgreementEncryptionConfiguration` instances.

Specified by:
  `getKeyAgreementConfigurations` in interface `EncryptionConfiguration`
Returns:
  the

### setKeyAgreementConfigurations

@Nonnull public BasicEncryptionConfiguration setKeyAgreementConfigurations(@Nullable Map<String,KeyAgreementEncryptionConfiguration> configs)
Set the map of `KeyAgreementEncryptionConfiguration` instances.

Parameters:
  `configs` - the new map of instances
Returns:
  this object