Bouncy Castle Cryptography Library 1.87

org.bouncycastle.cms.jcajce
Class JceKEMRecipientInfoGenerator

java.lang.Object
  extended byorg.bouncycastle.cms.KEMRecipientInfoGenerator
      extended byorg.bouncycastle.cms.jcajce.JceKEMRecipientInfoGenerator
All Implemented Interfaces:
RecipientInfoGenerator

public class JceKEMRecipientInfoGenerator
extends KEMRecipientInfoGenerator


Field Summary
 
Fields inherited from class org.bouncycastle.cms.KEMRecipientInfoGenerator
wrapper
 
Constructor Summary
JceKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier, java.security.PublicKey publicKey, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
           
JceKEMRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
           
 
Method Summary
 JceKEMRecipientInfoGenerator setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, java.lang.String algorithmName)
          Internally algorithm ids are converted into cipher names using a lookup table.
 JceKEMRecipientInfoGenerator setKDF(org.bouncycastle.asn1.x509.AlgorithmIdentifier kdfAlgorithm)
           
 JceKEMRecipientInfoGenerator setProvider(java.security.Provider provider)
           
 JceKEMRecipientInfoGenerator setProvider(java.lang.String providerName)
           
 JceKEMRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)
           
 JceKEMRecipientInfoGenerator setUserKeyingMaterial(byte[] userKeyingMaterial)
           
 
Methods inherited from class org.bouncycastle.cms.KEMRecipientInfoGenerator
generate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JceKEMRecipientInfoGenerator

public JceKEMRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert,
                                    org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
                             throws java.security.cert.CertificateEncodingException

JceKEMRecipientInfoGenerator

public JceKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier,
                                    java.security.PublicKey publicKey,
                                    org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
Method Detail

setProvider

public JceKEMRecipientInfoGenerator setProvider(java.lang.String providerName)

setProvider

public JceKEMRecipientInfoGenerator setProvider(java.security.Provider provider)

setSecureRandom

public JceKEMRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)

setKDF

public JceKEMRecipientInfoGenerator setKDF(org.bouncycastle.asn1.x509.AlgorithmIdentifier kdfAlgorithm)

setUserKeyingMaterial

public JceKEMRecipientInfoGenerator setUserKeyingMaterial(byte[] userKeyingMaterial)

setAlgorithmMapping

public JceKEMRecipientInfoGenerator setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
                                                        java.lang.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.

Bouncy Castle Cryptography Library 1.87