Examples of addRecipientInfoGenerator()


Examples of org.bouncycastle.cms.CMSEnvelopedDataGenerator.addRecipientInfoGenerator()

      recipientGenerator = new JceKeyTransRecipientInfoGenerator(
          recipient);
    } catch (CertificateEncodingException e) {
      throw new MessageEncodingException(e);
    }
    edGenerator.addRecipientInfoGenerator(recipientGenerator);
    LOGGER.debug(
        "Encrypting pkcsPkiEnvelope using key belonging to [issuer={}; serial={}]",
        recipient.getIssuerDN(), recipient.getSerialNumber());

    OutputEncryptor encryptor;
View Full Code Here

Examples of org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator.addRecipientInfoGenerator()

                 .build();
         if (out.getCertificate() == null) throw new NullPointerException("The certificate object was not set.");
         JceKeyTransRecipientInfoGenerator infoGenerator = new JceKeyTransRecipientInfoGenerator(out.getCertificate());
         infoGenerator.setProvider("BC");
         CMSEnvelopedDataStreamGenerator generator = new CMSEnvelopedDataStreamGenerator();
         generator.addRecipientInfoGenerator(infoGenerator);


         MimeBodyPart _msg = createBodyPart(providers, out);

         baos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator.addRecipientInfoGenerator()

      OutputEncryptor encryptor = new JceCMSContentEncryptorBuilder(CMSAlgorithm.DES_EDE3_CBC)
              .setProvider("BC")
              .build();
      JceKeyTransRecipientInfoGenerator infoGenerator = new JceKeyTransRecipientInfoGenerator(cert);
      CMSEnvelopedDataStreamGenerator generator = new CMSEnvelopedDataStreamGenerator();
      generator.addRecipientInfoGenerator(infoGenerator);


      InternetHeaders ih = new InternetHeaders();
      ih.addHeader("Content-Type", "application/xml");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.