Creating a Cerificate for Bouncy Castle Encryption
Posted
by Gordon
on Stack Overflow
See other posts from Stack Overflow
or by Gordon
Published on 2010-04-23T10:01:59Z
Indexed on
2010/04/23
10:03 UTC
Read the original article
Hit count: 338
I am trying to create a self-signed certificate to use for encrypting an email using bouncycaste.
What would be the best way to generate a certificate?
I have tried using openssl but I have had problems with certificate.
Here is the code I am using to encrypt, I am using 3des.
SMIMEEnvelopedGenerator gen = new SMIMEEnvelopedGenerator();
gen.addKeyTransRecipient(x509Cert); // adds an X509Certificate
MimeBodyPart encData =
gen.generate(mimeBodyPart, SMIMEEnvelopedGenerator.DES_EDE3_CBC, "BC");
© Stack Overflow or respective owner