public class

JceKeyAgreeRecipientInfoGenerator

extends KeyAgreeRecipientInfoGenerator
java.lang.Object
   ↳ org.bouncycastle.cms.KeyAgreeRecipientInfoGenerator
     ↳ org.bouncycastle.cms.jcajce.JceKeyAgreeRecipientInfoGenerator

Summary

Public Constructors
JceKeyAgreeRecipientInfoGenerator(ASN1ObjectIdentifier keyAgreementOID, PrivateKey senderPrivateKey, PublicKey senderPublicKey, ASN1ObjectIdentifier keyEncryptionOID)
Public Methods
JceKeyAgreeRecipientInfoGenerator addRecipient(X509Certificate recipientCert)
Add a recipient based on the passed in certificate's public key and its issuer and serial number.
JceKeyAgreeRecipientInfoGenerator addRecipient(byte[] subjectKeyID, PublicKey publicKey)
Add a recipient identified by the passed in subjectKeyID and the for the passed in public key.
ASN1Sequence generateRecipientEncryptedKeys(AlgorithmIdentifier keyAgreeAlgorithm, AlgorithmIdentifier keyEncryptionAlgorithm, GenericKey contentEncryptionKey)
JceKeyAgreeRecipientInfoGenerator setProvider(String providerName)
JceKeyAgreeRecipientInfoGenerator setProvider(Provider provider)
JceKeyAgreeRecipientInfoGenerator setSecureRandom(SecureRandom random)
Protected Methods
ASN1Encodable getUserKeyingMaterial(AlgorithmIdentifier keyAgreeAlg)
[Expand]
Inherited Methods
From class org.bouncycastle.cms.KeyAgreeRecipientInfoGenerator
From class java.lang.Object
From interface org.bouncycastle.cms.RecipientInfoGenerator

Public Constructors

public JceKeyAgreeRecipientInfoGenerator (ASN1ObjectIdentifier keyAgreementOID, PrivateKey senderPrivateKey, PublicKey senderPublicKey, ASN1ObjectIdentifier keyEncryptionOID)

Throws
CMSException

Public Methods

public JceKeyAgreeRecipientInfoGenerator addRecipient (X509Certificate recipientCert)

Add a recipient based on the passed in certificate's public key and its issuer and serial number.

Parameters
recipientCert recipient's certificate
Returns
  • the current instance.
Throws
CertificateEncodingException if the necessary data cannot be extracted from the certificate.

public JceKeyAgreeRecipientInfoGenerator addRecipient (byte[] subjectKeyID, PublicKey publicKey)

Add a recipient identified by the passed in subjectKeyID and the for the passed in public key.

Parameters
subjectKeyID identifier actual recipient will use to match the private key.
publicKey the public key for encrypting the secret key.
Returns
  • the current instance.

public ASN1Sequence generateRecipientEncryptedKeys (AlgorithmIdentifier keyAgreeAlgorithm, AlgorithmIdentifier keyEncryptionAlgorithm, GenericKey contentEncryptionKey)

Throws
CMSException

public JceKeyAgreeRecipientInfoGenerator setProvider (String providerName)

public JceKeyAgreeRecipientInfoGenerator setProvider (Provider provider)

public JceKeyAgreeRecipientInfoGenerator setSecureRandom (SecureRandom random)

Protected Methods

protected ASN1Encodable getUserKeyingMaterial (AlgorithmIdentifier keyAgreeAlg)

Throws
CMSException