Top Fields Constructors Methods
org.bouncycastle.cms.jcajce

public abstract Class JceKEKRecipient

extends Object
implements KEKRecipient
Class Inheritance
All Implemented Interfaces
org.bouncycastle.cms.KEKRecipient, org.bouncycastle.cms.Recipient
Known Direct Subclasses
org.bouncycastle.cms.jcajce.JceKEKAuthenticatedRecipient, org.bouncycastle.cms.jcajce.JceKEKEnvelopedRecipient
Imports
java.security.Key, .Provider, javax.crypto.SecretKey, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.cms.CMSException, .KEKRecipient, org.bouncycastle.operator.OperatorException, .SymmetricKeyUnwrapper

Field Summary

Modifier and TypeField and Description
protected EnvelopedDataHelper
protected EnvelopedDataHelper
private SecretKey
protected boolean

Constructor Summary

AccessConstructor and Description
public
JceKEKRecipient(SecretKey recipientKey)

Method Summary

Modifier and TypeMethod and Description
protected Key
extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm, AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedContentEncryptionKey)

public JceKEKRecipient

Returns:

this recipient.
setContentProvider
(Provider
the provider to use.
provider
)

Set the provider to use for content processing.

public JceKEKRecipient

Returns:

this recipient.
setContentProvider
(String
the name of the provider to use.
providerName
)

Set the provider to use for content processing.

public JceKEKRecipient

Returns:

this recipient.
setKeySizeValidation
(boolean
true if unwrapped key's should be validated against the content encryption algorithm, false otherwise.
doValidate
)

Set validation of retrieved key sizes against the algorithm parameters for the encrypted key where possible - default is off.

public JceKEKRecipient

Returns:

this recipient.
setProvider
(Provider
provider to use.
provider
)

Set the provider to use for key recovery and content processing.

public JceKEKRecipient

Returns:

this recipient.
setProvider
(String
the name of the provider to use.
providerName
)

Set the provider to use for key recovery and content processing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentHelperback to summary
protected EnvelopedDataHelper contentHelper
helperback to summary
protected EnvelopedDataHelper helper
recipientKeyback to summary
private SecretKey recipientKey
validateKeySizeback to summary
protected boolean validateKeySize

Constructor Detail

JceKEKRecipientback to summary
public JceKEKRecipient(SecretKey recipientKey)

Method Detail

extractSecretKeyback to summary
protected Key extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm, AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedContentEncryptionKey) throws CMSException
setContentProviderback to summary
public JceKEKRecipient setContentProvider(Provider provider)

Set the provider to use for content processing.

Parameters
provider:Provider

the provider to use.

Returns:JceKEKRecipient

this recipient.

setContentProviderback to summary
public JceKEKRecipient setContentProvider(String providerName)

Set the provider to use for content processing.

Parameters
providerName:String

the name of the provider to use.

Returns:JceKEKRecipient

this recipient.

setKeySizeValidationback to summary
public JceKEKRecipient setKeySizeValidation(boolean doValidate)

Set validation of retrieved key sizes against the algorithm parameters for the encrypted key where possible - default is off.

This setting will not have any affect if the encryption algorithm in the recipient does not specify a particular key size, or if the unwrapper is a HSM and the byte encoding of the unwrapped secret key is not available.

Parameters
doValidate:boolean

true if unwrapped key's should be validated against the content encryption algorithm, false otherwise.

Returns:JceKEKRecipient

this recipient.

setProviderback to summary
public JceKEKRecipient setProvider(Provider provider)

Set the provider to use for key recovery and content processing.

Parameters
provider:Provider

provider to use.

Returns:JceKEKRecipient

this recipient.

setProviderback to summary
public JceKEKRecipient setProvider(String providerName)

Set the provider to use for key recovery and content processing.

Parameters
providerName:String

the name of the provider to use.

Returns:JceKEKRecipient

this recipient.