public class JceKeyTransRecipientInfoGenerator extends KeyTransRecipientInfoGenerator
wrapper
Constructor and Description |
---|
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
AlgorithmIdentifier algorithmIdentifier,
PublicKey publicKey)
Create a generator overriding the algorithm type implied by the public key passed in.
|
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
AsymmetricKeyWrapper wrapper) |
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
PublicKey publicKey) |
JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert) |
JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert,
AlgorithmIdentifier algorithmIdentifier)
Create a generator overriding the algorithm type implied by the public key in the certificate passed in.
|
JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert,
AsymmetricKeyWrapper wrapper) |
Modifier and Type | Method and Description |
---|---|
JceKeyTransRecipientInfoGenerator |
setAlgorithmMapping(ASN1ObjectIdentifier algorithm,
String algorithmName)
Internally algorithm ids are converted into cipher names using a lookup table.
|
JceKeyTransRecipientInfoGenerator |
setProvider(Provider provider) |
JceKeyTransRecipientInfoGenerator |
setProvider(String providerName) |
generate
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert) throws CertificateEncodingException
CertificateEncodingException
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert, AsymmetricKeyWrapper wrapper) throws CertificateEncodingException
CertificateEncodingException
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, PublicKey publicKey)
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, AsymmetricKeyWrapper wrapper)
public JceKeyTransRecipientInfoGenerator(X509Certificate recipientCert, AlgorithmIdentifier algorithmIdentifier) throws CertificateEncodingException
recipientCert
- certificate carrying the public key.algorithmIdentifier
- the identifier and parameters for the encryption algorithm to be used.CertificateEncodingException
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, AlgorithmIdentifier algorithmIdentifier, PublicKey publicKey)
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.public JceKeyTransRecipientInfoGenerator setProvider(String providerName)
public JceKeyTransRecipientInfoGenerator setProvider(Provider provider)
public JceKeyTransRecipientInfoGenerator setAlgorithmMapping(ASN1ObjectIdentifier algorithm, String algorithmName)
For example:
unwrapper.setAlgorithmMapping(PKCSObjectIdentifiers.rsaEncryption, "RSA");
algorithm
- OID of algorithm in recipient.algorithmName
- JCE algorithm name to use.Copyright © 2020 BouncyCastle.org. All rights reserved.