public class JceKeyTransRecipientInfoGenerator extends KeyTransRecipientInfoGenerator
wrapper
Constructor and Description |
---|
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier,
java.security.PublicKey publicKey)
Create a generator overriding the algorithm type implied by the public key passed in.
|
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
AsymmetricKeyWrapper wrapper) |
JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier,
java.security.PublicKey publicKey) |
JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert) |
JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert,
org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
Create a generator overriding the algorithm type implied by the public key in the certificate passed in.
|
JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert,
AsymmetricKeyWrapper wrapper) |
Modifier and Type | Method and Description |
---|---|
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) |
generate
public JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert) throws java.security.cert.CertificateEncodingException
java.security.cert.CertificateEncodingException
public JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert, AsymmetricKeyWrapper wrapper) throws java.security.cert.CertificateEncodingException
java.security.cert.CertificateEncodingException
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, java.security.PublicKey publicKey)
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, AsymmetricKeyWrapper wrapper)
public JceKeyTransRecipientInfoGenerator(java.security.cert.X509Certificate recipientCert, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier) throws java.security.cert.CertificateEncodingException
recipientCert
- certificate carrying the public key.algorithmIdentifier
- the identifier and parameters for the encryption algorithm to be used.java.security.cert.CertificateEncodingException
public JceKeyTransRecipientInfoGenerator(byte[] subjectKeyIdentifier, org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier, java.security.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(java.lang.String providerName)
public JceKeyTransRecipientInfoGenerator setProvider(java.security.Provider provider)
public JceKeyTransRecipientInfoGenerator setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm, java.lang.String algorithmName)
For example:
unwrapper.setAlgorithmMapping(PKCSObjectIdentifiers.rsaEncryption, "RSA");
algorithm
- OID of algorithm in recipient.algorithmName
- JCE algorithm name to use.