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 ASN1Encodable |
getUserKeyingMaterial(AlgorithmIdentifier keyAgreeAlg) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(Provider provider) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(String providerName) |
JceKeyAgreeRecipientInfoGenerator |
setSecureRandom(SecureRandom random) |
createOriginatorPublicKey, generate
public JceKeyAgreeRecipientInfoGenerator(ASN1ObjectIdentifier keyAgreementOID, PrivateKey senderPrivateKey, PublicKey senderPublicKey, ASN1ObjectIdentifier keyEncryptionOID) throws CMSException
CMSException
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 ASN1Encodable getUserKeyingMaterial(AlgorithmIdentifier keyAgreeAlg) throws CMSException
getUserKeyingMaterial
in class KeyAgreeRecipientInfoGenerator
CMSException
Copyright © 2015. All rights reserved.