public abstract class JceKEKRecipient extends Object implements KEKRecipient
Modifier and Type | Field and Description |
---|---|
protected EnvelopedDataHelper |
contentHelper |
protected EnvelopedDataHelper |
helper |
protected boolean |
validateKeySize |
Constructor and Description |
---|
JceKEKRecipient(SecretKey recipientKey) |
Modifier and Type | Method and Description |
---|---|
protected Key |
extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm,
AlgorithmIdentifier encryptedKeyAlgorithm,
byte[] encryptedContentEncryptionKey) |
JceKEKRecipient |
setContentProvider(Provider provider)
Set the provider to use for content processing.
|
JceKEKRecipient |
setContentProvider(String providerName)
Set the provider to use for content processing.
|
JceKEKRecipient |
setKeySizeValidation(boolean doValidate)
Set validation of retrieved key sizes against the algorithm parameters for the encrypted key where possible - default is off.
|
JceKEKRecipient |
setProvider(Provider provider)
Set the provider to use for key recovery and content processing.
|
JceKEKRecipient |
setProvider(String providerName)
Set the provider to use for key recovery and content processing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRecipientOperator
protected EnvelopedDataHelper helper
protected EnvelopedDataHelper contentHelper
protected boolean validateKeySize
public JceKEKRecipient(SecretKey recipientKey)
public JceKEKRecipient setProvider(Provider provider)
provider
- provider to use.public JceKEKRecipient setProvider(String providerName)
providerName
- the name of the provider to use.public JceKEKRecipient setContentProvider(Provider provider)
provider
- the provider to use.public JceKEKRecipient setContentProvider(String providerName)
providerName
- the name of the provider to use.public JceKEKRecipient setKeySizeValidation(boolean doValidate)
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.
doValidate
- true if unwrapped key's should be validated against the content encryption algorithm, false otherwise.protected Key extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm, AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedContentEncryptionKey) throws CMSException
CMSException
Copyright © 2018 BouncyCastle.org. All rights reserved.