Package org.bouncycastle.cms.jcajce

Examples of org.bouncycastle.cms.jcajce.JceKeyTransRecipientInfoGenerator


    LOGGER.debug("Encoding pkcsPkiEnvelope");
    CMSEnvelopedDataGenerator edGenerator = new CMSEnvelopedDataGenerator();
    CMSTypedData envelopable = new CMSProcessableByteArray(messageData);
    RecipientInfoGenerator recipientGenerator;
    try {
      recipientGenerator = new JceKeyTransRecipientInfoGenerator(
          recipient);
    } catch (CertificateEncodingException e) {
      throw new MessageEncodingException(e);
    }
    edGenerator.addRecipientInfoGenerator(recipientGenerator);
View Full Code Here


         OutputEncryptor encryptor = new JceCMSContentEncryptorBuilder(CMSAlgorithm.DES_EDE3_CBC)
                 .setProvider("BC")
                 .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);
View Full Code Here

   public void testBody() throws Exception
   {
      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();
View Full Code Here

TOP

Related Classes of org.bouncycastle.cms.jcajce.JceKeyTransRecipientInfoGenerator

Copyright © 2018 www.massapicom. 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.