Package org.bouncycastle.cms.jcajce
Class JceKEKRecipient
java.lang.Object
org.bouncycastle.cms.jcajce.JceKEKRecipient
- All Implemented Interfaces:
KEKRecipient
,Recipient
- Direct Known Subclasses:
JceKEKAuthenticatedRecipient
,JceKEKEnvelopedRecipient
-
Field Summary
Modifier and TypeFieldDescriptionprotected EnvelopedDataHelper
protected EnvelopedDataHelper
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Key
extractSecretKey
(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedContentEncryptionKey) setContentProvider
(String providerName) Set the provider to use for content processing.setContentProvider
(Provider provider) Set the provider to use for content processing.setKeySizeValidation
(boolean doValidate) Set validation of retrieved key sizes against the algorithm parameters for the encrypted key where possible - default is off.setProvider
(String providerName) Set the provider to use for key recovery and content processing.setProvider
(Provider provider) Set the provider to use for key recovery and content processing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bouncycastle.cms.KEKRecipient
getRecipientOperator
-
Field Details
-
helper
-
contentHelper
-
validateKeySize
protected boolean validateKeySize
-
-
Constructor Details
-
JceKEKRecipient
-
-
Method Details
-
setProvider
Set the provider to use for key recovery and content processing.- Parameters:
provider
- provider to use.- Returns:
- this recipient.
-
setProvider
Set the provider to use for key recovery and content processing.- Parameters:
providerName
- the name of the provider to use.- Returns:
- this recipient.
-
setContentProvider
Set the provider to use for content processing.- Parameters:
provider
- the provider to use.- Returns:
- this recipient.
-
setContentProvider
Set the provider to use for content processing.- Parameters:
providerName
- the name of the provider to use.- Returns:
- this recipient.
-
setKeySizeValidation
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
- true if unwrapped key's should be validated against the content encryption algorithm, false otherwise.- Returns:
- this recipient.
-
extractSecretKey
protected Key extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedContentEncryptionKey) throws CMSException - Throws:
CMSException
-