public class JceKeyAgreeRecipientInfoGenerator extends KeyAgreeRecipientInfoGenerator
| Constructor and Description |
|---|
JceKeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID,
PrivateKey senderPrivateKey,
PublicKey senderPublicKey,
org.bouncycastle.asn1.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.
|
org.bouncycastle.asn1.ASN1Sequence |
generateRecipientEncryptedKeys(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm,
GenericKey contentEncryptionKey) |
protected org.bouncycastle.asn1.ASN1Encodable |
getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlg) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(Provider provider) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(String providerName) |
JceKeyAgreeRecipientInfoGenerator |
setSecureRandom(SecureRandom random) |
createOriginatorPublicKey, generatepublic JceKeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID,
PrivateKey senderPrivateKey,
PublicKey senderPublicKey,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID)
throws CMSException
CMSExceptionpublic 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.CertificateEncodingExceptionpublic org.bouncycastle.asn1.ASN1Sequence generateRecipientEncryptedKeys(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm,
GenericKey contentEncryptionKey)
throws CMSException
generateRecipientEncryptedKeys in class KeyAgreeRecipientInfoGeneratorCMSExceptionprotected org.bouncycastle.asn1.ASN1Encodable getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlg)
throws CMSException
getUserKeyingMaterial in class KeyAgreeRecipientInfoGeneratorCMSExceptionCopyright © 2014. All rights reserved.