Last active
December 27, 2018 19:20
-
-
Save jstedfast/1f87f0c3aa73cad7ff169c3407f3c634 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first we need to base64 decode the content of the existing pkcs7-mime part | |
var content = new MemoryStream (); | |
pkcs7.Content.DecodeTo (content); | |
content.Position = 0; | |
// now we create a new pkcs7-mime part with the proper smime-type parameter | |
pkcs7 = new ApplicationPkcs7Mime (SecureMimeType.EnvelopedData, content); | |
// now decrypt it: | |
var decrypted = pkcs7.Decrypt (ctx); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment