OpenSSL equivalent in C#, .Net Framework 4.5

Viewed 37

Using this command:

openssl smime -encrypt -aes-256-cbc -in input.txt -out output.txt -outform DER yourSslCertificate.pem

I can decrypt (using my private key) an encrypted file (encrypted with my public key). Is there a direct translation to this not using OpenSSL but only .Net 4.5 Framework (or lower) classes. I can use BounceCastle if it helps.

The private key was created using openssl:

openssl req -x509 -nodes -days 100000 -newkey rsa:8912 -keyout private_key.pem -out certificate.pem

0 Answers
Related