Class JceKEMRecipientInfoGenerator

    • Constructor Detail

      • JceKEMRecipientInfoGenerator

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

        public JceKEMRecipientInfoGenerator​(byte[] subjectKeyIdentifier,
                                            java.security.PublicKey publicKey,
                                            org.bouncycastle.asn1.ASN1ObjectIdentifier symWrapAlgorithm)
    • Method Detail

      • setAlgorithmMapping

        public JceKEMRecipientInfoGenerator 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.