Bouncy Castle Cryptography Library 1.49

org.bouncycastle.cms.jcajce
Class JceKeyTransRecipientInfoGenerator

java.lang.Object
  extended by org.bouncycastle.cms.KeyTransRecipientInfoGenerator
      extended by org.bouncycastle.cms.jcajce.JceKeyTransRecipientInfoGenerator
All Implemented Interfaces:
RecipientInfoGenerator

public class JceKeyTransRecipientInfoGenerator
extends KeyTransRecipientInfoGenerator


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

Constructor Detail

JceKeyTransRecipientInfoGenerator

public JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert)
                                  throws java.security.cert.CertificateEncodingException
Throws:
java.security.cert.CertificateEncodingException

JceKeyTransRecipientInfoGenerator

public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
                                         java.security.PublicKey publicKey)
Method Detail

setProvider

public JceKeyTransRecipientInfoGenerator setProvider(java.lang.String providerName)

setProvider

public JceKeyTransRecipientInfoGenerator setProvider(java.security.Provider provider)

setAlgorithmMapping

public JceKeyTransRecipientInfoGenerator 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.49