Top Fields Constructors Methods
org.bouncycastle.cms.jcajce

public Class JceKeyTransRecipientInfoGenerator

extends KeyTransRecipientInfoGenerator
Class Inheritance
Imports
java.security.Provider, .PublicKey, java.security.cert.CertificateEncodingException, .X509Certificate, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.cms.IssuerAndSerialNumber, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.cert.jcajce.JcaX509CertificateHolder, org.bouncycastle.cms.KeyTransRecipientInfoGenerator, org.bouncycastle.operator.AsymmetricKeyWrapper, org.bouncycastle.operator.jcajce.JceAsymmetricKeyWrapper

Field Summary

Inherited from org.bouncycastle.cms.KeyTransRecipientInfoGenerator:
wrapper

Constructor Summary

AccessConstructor and Description
public
public
public
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, PublicKey publicKey)

public
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, AsymmetricKeyWrapper wrapper)

public
JceKeyTransRecipientInfoGenerator(X509Certificate
certificate carrying the public key.
recipientCert
,
AlgorithmIdentifier
the identifier and parameters for the encryption algorithm to be used.
algorithmIdentifier
)

Create a generator overriding the algorithm type implied by the public key in the certificate passed in.

public
JceKeyTransRecipientInfoGenerator(byte[]
the subject key identifier value to associate with the public key.
subjectKeyIdentifier
,
AlgorithmIdentifier
the identifier and parameters for the encryption algorithm to be used.
algorithmIdentifier
,
PublicKey
the public key to use.
publicKey
)

Create a generator overriding the algorithm type implied by the public key passed in.

Method Summary

Modifier and TypeMethod and Description
public JceKeyTransRecipientInfoGenerator

Returns:

the current RecipientInfoGenerator.
setAlgorithmMapping
(ASN1ObjectIdentifier
OID of algorithm in recipient.
algorithm
,
String
JCE algorithm name to use.
algorithmName
)

Internally algorithm ids are converted into cipher names using a lookup table.

public JceKeyTransRecipientInfoGenerator
setProvider(String providerName)

public JceKeyTransRecipientInfoGenerator
Inherited from org.bouncycastle.cms.KeyTransRecipientInfoGenerator:
generate

Constructor Detail

JceKeyTransRecipientInfoGeneratorback to summary
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert) throws CertificateEncodingException
JceKeyTransRecipientInfoGeneratorback to summary
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert, AsymmetricKeyWrapper wrapper) throws CertificateEncodingException
JceKeyTransRecipientInfoGeneratorback to summary
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, PublicKey publicKey)
JceKeyTransRecipientInfoGeneratorback to summary
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, AsymmetricKeyWrapper wrapper)
JceKeyTransRecipientInfoGeneratorback to summary
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert, AlgorithmIdentifier algorithmIdentifier) throws CertificateEncodingException

Create a generator overriding the algorithm type implied by the public key in the certificate passed in.

Parameters
recipientCert:X509Certificate

certificate carrying the public key.

algorithmIdentifier:AlgorithmIdentifier

the identifier and parameters for the encryption algorithm to be used.

JceKeyTransRecipientInfoGeneratorback to summary
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, AlgorithmIdentifier algorithmIdentifier, PublicKey publicKey)

Create a generator overriding the algorithm type implied by the public key passed in.

Parameters
subjectKeyIdentifier:byte[]

the subject key identifier value to associate with the public key.

algorithmIdentifier:AlgorithmIdentifier

the identifier and parameters for the encryption algorithm to be used.

publicKey:PublicKey

the public key to use.

Method Detail

setAlgorithmMappingback to summary
public JceKeyTransRecipientInfoGenerator setAlgorithmMapping(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:ASN1ObjectIdentifier

OID of algorithm in recipient.

algorithmName:String

JCE algorithm name to use.

Returns:JceKeyTransRecipientInfoGenerator

the current RecipientInfoGenerator.

setProviderback to summary
public JceKeyTransRecipientInfoGenerator setProvider(String providerName)
setProviderback to summary
public JceKeyTransRecipientInfoGenerator setProvider(Provider provider)