Class JceKEMRecipientInfoGenerator

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

public class JceKEMRecipientInfoGenerator extends KEMRecipientInfoGenerator
  • Constructor Details

    • JceKEMRecipientInfoGenerator

      public JceKEMRecipientInfoGenerator(X509Certificate recipientCert, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm) throws CertificateEncodingException
      Throws:
      CertificateEncodingException
    • JceKEMRecipientInfoGenerator

      public JceKEMRecipientInfoGenerator(byte[] subjectKeyIdentifier, PublicKey publicKey, org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
  • Method Details

    • setProvider

      public JceKEMRecipientInfoGenerator setProvider(String providerName)
    • setProvider

      public JceKEMRecipientInfoGenerator setProvider(Provider provider)
    • setSecureRandom

      public JceKEMRecipientInfoGenerator setSecureRandom(SecureRandom random)
    • setKDF

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

      public JceKEMRecipientInfoGenerator setAlgorithmMapping(org.bouncycastle.asn1.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 - OID of algorithm in recipient.
      algorithmName - JCE algorithm name to use.
      Returns:
      the current RecipientInfoGenerator.