Package org.bouncycastle.cms.jcajce
Class JceKeyTransRecipientInfoGenerator
java.lang.Object
org.bouncycastle.cms.KeyTransRecipientInfoGenerator
org.bouncycastle.cms.jcajce.JceKeyTransRecipientInfoGenerator
- All Implemented Interfaces:
RecipientInfoGenerator
-
Field Summary
Fields inherited from class org.bouncycastle.cms.KeyTransRecipientInfoGenerator
wrapper
-
Constructor Summary
ConstructorsConstructorDescriptionJceKeyTransRecipientInfoGenerator
(byte[] subjectKeyIdentifier, PublicKey publicKey) JceKeyTransRecipientInfoGenerator
(byte[] subjectKeyIdentifier, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier, PublicKey publicKey) Create a generator overriding the algorithm type implied by the public key passed in.JceKeyTransRecipientInfoGenerator
(byte[] subjectKeyIdentifier, AsymmetricKeyWrapper wrapper) JceKeyTransRecipientInfoGenerator
(X509Certificate recipientCert) JceKeyTransRecipientInfoGenerator
(X509Certificate recipientCert, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) Create a generator overriding the algorithm type implied by the public key in the certificate passed in.JceKeyTransRecipientInfoGenerator
(X509Certificate recipientCert, AsymmetricKeyWrapper wrapper) -
Method Summary
Modifier and TypeMethodDescriptionsetAlgorithmMapping
(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, String algorithmName) Internally algorithm ids are converted into cipher names using a lookup table.setProvider
(String providerName) setProvider
(Provider provider) Methods inherited from class org.bouncycastle.cms.KeyTransRecipientInfoGenerator
generate
-
Constructor Details
-
JceKeyTransRecipientInfoGenerator
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert) throws CertificateEncodingException - Throws:
CertificateEncodingException
-
JceKeyTransRecipientInfoGenerator
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert, AsymmetricKeyWrapper wrapper) throws CertificateEncodingException - Throws:
CertificateEncodingException
-
JceKeyTransRecipientInfoGenerator
-
JceKeyTransRecipientInfoGenerator
-
JceKeyTransRecipientInfoGenerator
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) throws CertificateEncodingException Create a generator overriding the algorithm type implied by the public key in the certificate passed in.- Parameters:
recipientCert
- certificate carrying the public key.algorithmIdentifier
- the identifier and parameters for the encryption algorithm to be used.- Throws:
CertificateEncodingException
-
JceKeyTransRecipientInfoGenerator
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier, PublicKey publicKey) Create a generator overriding the algorithm type implied by the public key passed in.- Parameters:
subjectKeyIdentifier
- the subject key identifier value to associate with the public key.algorithmIdentifier
- the identifier and parameters for the encryption algorithm to be used.publicKey
- the public key to use.
-
-
Method Details
-
setProvider
-
setProvider
-
setAlgorithmMapping
public JceKeyTransRecipientInfoGenerator setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, String algorithmName) Internally algorithm ids are converted into cipher names using a lookup table. For some providers the standard lookup table won't work. Use this method to establish a specific mapping from an algorithm identifier to a specific algorithm.For example:
unwrapper.setAlgorithmMapping(PKCSObjectIdentifiers.rsaEncryption, "RSA");
- Parameters:
algorithm
- OID of algorithm in recipient.algorithmName
- JCE algorithm name to use.- Returns:
- the current RecipientInfoGenerator.
-