public abstract class JceKeyAgreeRecipient extends Object implements KeyAgreeRecipient
Modifier and Type | Field and Description |
---|---|
protected EnvelopedDataHelper |
contentHelper |
protected EnvelopedDataHelper |
helper |
Constructor and Description |
---|
JceKeyAgreeRecipient(PrivateKey recipientKey) |
Modifier and Type | Method and Description |
---|---|
protected Key |
extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm,
AlgorithmIdentifier contentEncryptionAlgorithm,
SubjectPublicKeyInfo senderKey,
ASN1OctetString userKeyingMaterial,
byte[] encryptedContentEncryptionKey) |
AlgorithmIdentifier |
getPrivateKeyAlgorithmIdentifier() |
JceKeyAgreeRecipient |
setContentProvider(Provider provider)
Set the provider to use for content processing.
|
JceKeyAgreeRecipient |
setContentProvider(String providerName)
Set the provider to use for content processing.
|
JceKeyAgreeRecipient |
setPrivateKeyAlgorithmIdentifier(AlgorithmIdentifier privKeyAlgID)
Set the algorithm identifier for the private key.
|
JceKeyAgreeRecipient |
setProvider(Provider provider)
Set the provider to use for key recovery and content processing.
|
JceKeyAgreeRecipient |
setProvider(String providerName)
Set the provider to use for key recovery and content processing.
|
protected Key |
unwrapSessionKey(ASN1ObjectIdentifier wrapAlg,
SecretKey agreedKey,
ASN1ObjectIdentifier contentEncryptionAlgorithm,
byte[] encryptedContentEncryptionKey) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRecipientOperator
protected EnvelopedDataHelper helper
protected EnvelopedDataHelper contentHelper
public JceKeyAgreeRecipient(PrivateKey recipientKey)
public JceKeyAgreeRecipient setProvider(Provider provider)
provider
- provider to use.public JceKeyAgreeRecipient setProvider(String providerName)
providerName
- the name of the provider to use.public JceKeyAgreeRecipient setContentProvider(Provider provider)
provider
- the provider to use.public JceKeyAgreeRecipient setContentProvider(String providerName)
providerName
- the name of the provider to use.public JceKeyAgreeRecipient setPrivateKeyAlgorithmIdentifier(AlgorithmIdentifier privKeyAlgID)
privKeyAlgID
- the name of the provider to use.protected Key unwrapSessionKey(ASN1ObjectIdentifier wrapAlg, SecretKey agreedKey, ASN1ObjectIdentifier contentEncryptionAlgorithm, byte[] encryptedContentEncryptionKey) throws CMSException, InvalidKeyException, NoSuchAlgorithmException
protected Key extractSecretKey(AlgorithmIdentifier keyEncryptionAlgorithm, AlgorithmIdentifier contentEncryptionAlgorithm, SubjectPublicKeyInfo senderKey, ASN1OctetString userKeyingMaterial, byte[] encryptedContentEncryptionKey) throws CMSException
CMSException
public AlgorithmIdentifier getPrivateKeyAlgorithmIdentifier()
getPrivateKeyAlgorithmIdentifier
in interface KeyAgreeRecipient
Copyright © 2020 BouncyCastle.org. All rights reserved.