Petey B
Petey B

Reputation: 11569

Decrypt p7m File Using C#?

I have a .p7m (application/pkcs7-mime) encrypted file on my hard drive, and the associated Private Key it was encrypted with. It is encrypted with AES (128bit) and enveloped with RSA (1024bit). I have successfully imported the key from my key store but I dont know how i would go about using it to decrypt a .p7m file. Any suggestions?

Upvotes: 1

Views: 3854

Answers (1)

President James K. Polk
President James K. Polk

Reputation: 42009

I think you start with the EnvelopedCms class and maybe use the Decode () method followed by the Decrypt method. It is hard to figure out from the documentation, but this page may help.

Upvotes: 1

Related Questions