public class JceKeyAgreeRecipientInfoGenerator extends KeyAgreeRecipientInfoGenerator
| Constructor and Description |
|---|
JceKeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID,
java.security.PrivateKey senderPrivateKey,
java.security.PublicKey senderPublicKey,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID) |
| Modifier and Type | Method and Description |
|---|---|
JceKeyAgreeRecipientInfoGenerator |
addRecipient(byte[] subjectKeyID,
java.security.PublicKey publicKey)
Add a recipient identified by the passed in subjectKeyID and the for the passed in public key.
|
JceKeyAgreeRecipientInfoGenerator |
addRecipient(java.security.cert.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 byte[] |
getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlg) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(java.security.Provider provider) |
JceKeyAgreeRecipientInfoGenerator |
setProvider(java.lang.String providerName) |
JceKeyAgreeRecipientInfoGenerator |
setSecureRandom(java.security.SecureRandom random) |
JceKeyAgreeRecipientInfoGenerator |
setUserKeyingMaterial(byte[] userKeyingMaterial) |
createOriginatorPublicKey, generatepublic JceKeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID,
java.security.PrivateKey senderPrivateKey,
java.security.PublicKey senderPublicKey,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID)
public JceKeyAgreeRecipientInfoGenerator setUserKeyingMaterial(byte[] userKeyingMaterial)
public JceKeyAgreeRecipientInfoGenerator setProvider(java.security.Provider provider)
public JceKeyAgreeRecipientInfoGenerator setProvider(java.lang.String providerName)
public JceKeyAgreeRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)
public JceKeyAgreeRecipientInfoGenerator addRecipient(java.security.cert.X509Certificate recipientCert) throws java.security.cert.CertificateEncodingException
recipientCert - recipient's certificatejava.security.cert.CertificateEncodingException - if the necessary data cannot be extracted from the certificate.public JceKeyAgreeRecipientInfoGenerator addRecipient(byte[] subjectKeyID, java.security.PublicKey publicKey) throws java.security.cert.CertificateEncodingException
subjectKeyID - identifier actual recipient will use to match the private key.publicKey - the public key for encrypting the secret key.java.security.cert.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 byte[] getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlg)
throws CMSException
getUserKeyingMaterial in class KeyAgreeRecipientInfoGeneratorCMSException