I need some help with this lib. Fetching the following examples code BouncyCastle and I do not understand how this works. My code: http://pastebin.com/RieDfUd9 Dictionary: chain[0], is sender cert. conv, is the receiver cert.
My problem is this, I need to encrypt an email using smime with the public key personnel which I am sending the email. At the moment in my test environment I have access to both certificates. But in a production environment I will have only access to my certificate (who is sending) chain [0], and the public key of those who receive. I need encryptar email so that I can open with the public key of who is reading (and which was used to encrypt the message).
I already tried several ways, but I always have problems when decrypting.