public class JceKeyAgreeRecipientInfoGenerator extends KeyAgreeRecipientInfoGenerator
Constructor and Description |
---|
JceKeyAgreeRecipientInfoGenerator(ASN1ObjectIdentifier keyAgreementOID,
PrivateKey senderPrivateKey,
PublicKey senderPublicKey,
ASN1ObjectIdentifier keyEncryptionOID) |
Modifier and Type | Method and Description |
---|---|
JceKeyAgreeRecipientInfoGenerator |
addRecipient(byte[] subjectKeyID,
PublicKey publicKey)
Add a recipient identified by the passed in subjectKeyID and the for the passed in public key.
|
JceKeyAgreeRecipientInfoGenerator |
addRecipient(X509Certificate recipientCert)
Add a recipient based on the passed in certificate's public key and its issuer and serial number.
|
ASN1Sequence |
generateRecipientEncryptedKeys(AlgorithmIdentifier keyAgreeAlgorithm,
AlgorithmIdentifier keyEncryptionAlgorithm,
GenericKey contentEncryptionKey) |
protected byte[] |
getUserKeyingMaterial(AlgorithmIdentifier keyAgreeAlg) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(Provider provider) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(String providerName) |
JceKeyAgreeRecipientInfoGenerator |
setSecureRandom(SecureRandom random) |
JceKeyAgreeRecipientInfoGenerator |
setUserKeyingMaterial(byte[] userKeyingMaterial) |
createOriginatorPublicKey, generate
public JceKeyAgreeRecipientInfoGenerator(ASN1ObjectIdentifier keyAgreementOID, PrivateKey senderPrivateKey, PublicKey senderPublicKey, ASN1ObjectIdentifier keyEncryptionOID)
public JceKeyAgreeRecipientInfoGenerator setUserKeyingMaterial(byte[] userKeyingMaterial)
public JceKeyAgreeRecipientInfoGenerator setProvider(Provider provider)
public JceKeyAgreeRecipientInfoGenerator setProvider(String providerName)
public JceKeyAgreeRecipientInfoGenerator setSecureRandom(SecureRandom random)
public JceKeyAgreeRecipientInfoGenerator addRecipient(X509Certificate recipientCert) throws CertificateEncodingException
recipientCert
- recipient's certificateCertificateEncodingException
- if the necessary data cannot be extracted from the certificate.public JceKeyAgreeRecipientInfoGenerator addRecipient(byte[] subjectKeyID, PublicKey publicKey) throws CertificateEncodingException
subjectKeyID
- identifier actual recipient will use to match the private key.publicKey
- the public key for encrypting the secret key.CertificateEncodingException
public ASN1Sequence generateRecipientEncryptedKeys(AlgorithmIdentifier keyAgreeAlgorithm, AlgorithmIdentifier keyEncryptionAlgorithm, GenericKey contentEncryptionKey) throws CMSException
generateRecipientEncryptedKeys
in class KeyAgreeRecipientInfoGenerator
CMSException
protected byte[] getUserKeyingMaterial(AlgorithmIdentifier keyAgreeAlg) throws CMSException
getUserKeyingMaterial
in class KeyAgreeRecipientInfoGenerator
CMSException
Copyright © 2020 BouncyCastle.org. All rights reserved.