Examples of addKeyTransRecipient()


Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        //
        MessageDigest           dig = MessageDigest.getInstance("SHA1", "BC");
        dig.update(_reciCert.getPublicKey().getEncoded());

         
        gen.addKeyTransRecipient(_reciCert.getPublicKey(), dig.digest());
        
        //
        // generate a MimeBodyPart object which encapsulates the content
        // we want encrypted.
        //
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        //
        MessageDigest           dig = MessageDigest.getInstance("SHA1", "BC");
        dig.update(_reciCert.getPublicKey().getEncoded());

         
        gen.addKeyTransRecipient(_reciCert.getPublicKey(), dig.digest());
        
        //
        // generate a MimeBodyPart object which encapsulates the content
        // we want encrypted.
        //
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

    {
        MimeBodyPart    _msg      = SMIMETestUtil.makeMimeBodyPart("WallaWallaWashington");

        SMIMEEnvelopedGenerator   gen = new SMIMEEnvelopedGenerator();
         
        gen.addKeyTransRecipient(_reciCert);
        gen.addKeyTransRecipient(_reciCert2);
        
        //
        // generate a MimeBodyPart object which encapsulates the content
        // we want encrypted.
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        MimeBodyPart    _msg      = SMIMETestUtil.makeMimeBodyPart("WallaWallaWashington");

        SMIMEEnvelopedGenerator   gen = new SMIMEEnvelopedGenerator();
         
        gen.addKeyTransRecipient(_reciCert);
        gen.addKeyTransRecipient(_reciCert2);
        
        //
        // generate a MimeBodyPart object which encapsulates the content
        // we want encrypted.
        //
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        MimeBodyPart msg)
        throws Exception
    {
        SMIMEEnvelopedGenerator  gen = new SMIMEEnvelopedGenerator();
         
        gen.addKeyTransRecipient(_reciCert);
        
        //
        // generate a MimeBodyPart object which encapsulates the content
        // we want encrypted.
        //
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        MimeBodyPart msg)
        throws Exception
    {
        SMIMEEnvelopedGenerator  gen = new SMIMEEnvelopedGenerator();
         
        gen.addKeyTransRecipient(_reciCert);
        
        //
        // generate a MimeBodyPart object which encapsulates the content
        // we want encrypted.
        //
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        //
        // create the generator for creating an smime/encrypted message
        //
        SMIMEEnvelopedGenerator  gen = new SMIMEEnvelopedGenerator();
         
        gen.addKeyTransRecipient((X509Certificate)chain[0]);

        //
        // create a subject key id - this has to be done the same way as
        // it is done in the certificate associated with the private key
        // version 3 only.
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

        //
        // create the generator for creating an smime/encrypted message
        //
        SMIMEEnvelopedGenerator  gen = new SMIMEEnvelopedGenerator();
         
        gen.addKeyTransRecipient((X509Certificate)chain[0]);

        //
        // create a subject key id - this has to be done the same way as
        // it is done in the certificate associated with the private key
        // version 3 only.
View Full Code Here

Examples of org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator.addKeyTransRecipient()

            signedMessage.setContent(mm);
            signedMessage.saveChanges();

            /* Create the encrypter */
            SMIMEEnvelopedGenerator encrypter = new SMIMEEnvelopedGenerator();
            encrypter.addKeyTransRecipient((X509Certificate)chain[0]);

            /* Encrypt the message */
            MimeBodyPart encryptedPart = encrypter.generate(signedMessage,
                    SMIMEEnvelopedGenerator.RC2_CBC, "BC");

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.