Class JceKEMRecipientInfoGenerator
java.lang.Object
org.bouncycastle.cms.KEMRecipientInfoGenerator
org.bouncycastle.cms.jcajce.JceKEMRecipientInfoGenerator
- All Implemented Interfaces:
RecipientInfoGenerator
-
Field Summary
Fields inherited from class KEMRecipientInfoGenerator
wrapper -
Constructor Summary
ConstructorsConstructorDescriptionJceKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier, PublicKey publicKey, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm) JceKEMRecipientInfoGenerator(X509Certificate recipientCert, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm) -
Method Summary
Modifier and TypeMethodDescriptionsetAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, String algorithmName) Internally algorithm ids are converted into cipher names using a lookup table.setKDF(org.bouncycastle.asn1.x509.AlgorithmIdentifier kdfAlgorithm) setProvider(String providerName) setProvider(Provider provider) setSecureRandom(SecureRandom random) Methods inherited from class KEMRecipientInfoGenerator
generate
-
Constructor Details
-
JceKEMRecipientInfoGenerator
public JceKEMRecipientInfoGenerator(X509Certificate recipientCert, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm) throws CertificateEncodingException - Throws:
CertificateEncodingException
-
JceKEMRecipientInfoGenerator
public JceKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier, PublicKey publicKey, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
-
-
Method Details
-
setProvider
-
setProvider
-
setSecureRandom
-
setKDF
public JceKEMRecipientInfoGenerator setKDF(org.bouncycastle.asn1.x509.AlgorithmIdentifier kdfAlgorithm) -
setAlgorithmMapping
public JceKEMRecipientInfoGenerator 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.
-