EnvelopedCms.Decrypt Method (RecipientInfo)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

The Decrypt(RecipientInfo) method decrypts the contents of the decoded enveloped CMS/PKCS #7 message by using the private key associated with the certificate identified by the specified recipient information.

Namespace:   System.Security.Cryptography.Pkcs
Assembly:  System.Security (in System.Security.dll)

public void Decrypt(
	RecipientInfo recipientInfo


Type: System.Security.Cryptography.Pkcs.RecipientInfo

A RecipientInfo object that represents the recipient information that identifies the certificate associated with the private key to use for the decryption.

Exception Condition

A null reference was passed to a method that does not accept it as a valid argument.


A cryptographic operation could not be completed.


A method call was invalid for the object's current state.

The following permissions are required to access the decryption key:

.NET Framework
Available since 2.0
Return to top