Package org.opensaml.xmlsec.encryption.support

# Class KeyEncryptionParameters

java.lang.Object
org.opensaml.xmlsec.encryption.support.DataEncryptionParameters
org.opensaml.xmlsec.encryption.support.KeyEncryptionParameters

public class KeyEncryptionParameters extends DataEncryptionParameters
Parameters for encrypting keys.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`recipient`
Recipient of the key.
`private RSAOAEPParameters`
`rsaOAEPParameters`
RSA OAEP parameters.

## Constructor Summary

Constructors
Constructor
Description
`KeyEncryptionParameters()`
Constructor.
`KeyEncryptionParameters(EncryptionParameters params, String recipientId)`
Convenience constructor which allows copying the relevant key encryption parameters from an instance of `EncryptionParameters`.

## Method Summary

Modifier and Type
Method
Description
`String`
`getRecipient()`
Gets the recipient of the key.
`RSAOAEPParameters`
`getRSAOAEPParameters()`
Get the instance of `RSAOAEPParameters`.
`void`
`setRecipient(String newRecipient)`
Sets the recipient of the key.
`void`
`setRSAOAEPParameters(RSAOAEPParameters params)`
Set the instance of `RSAOAEPParameters`.

### Methods inherited from class org.opensaml.xmlsec.encryption.support.DataEncryptionParameters

`getAlgorithm, getEncryptionCredential, getKeyInfoGenerator, setAlgorithm, setEncryptionCredential, setKeyInfoGenerator`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### recipient

@Nullable private String recipient
Recipient of the key.

### rsaOAEPParameters

@Nullable private RSAOAEPParameters rsaOAEPParameters
RSA OAEP parameters.

## Constructor Details

### KeyEncryptionParameters

public KeyEncryptionParameters()
Constructor.

### KeyEncryptionParameters

public KeyEncryptionParameters(EncryptionParameters params, String recipientId)
Convenience constructor which allows copying the relevant key encryption parameters from an instance of `EncryptionParameters`.

Parameters:
  `params` - the encryption parameters instance
  `recipientId` - the recipient of the key

## Method Details

### getRecipient

@Nullable public String getRecipient()
Gets the recipient of the key. When generating an EncryptedKey, this will be used as the value of the Recipient attribute.

Returns:
  the recipient of the key, or null

### setRecipient

public void setRecipient(@Nullable String newRecipient)
Sets the recipient of the key. When generating an EncryptedKey, this will be used as the value of the Recipient attribute.

Parameters:
  `newRecipient` - the recipient of the key

### getRSAOAEPParameters

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

Returns:
  the parameters instance

### setRSAOAEPParameters

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

Parameters:
  `params` - the new parameters instance