System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt Method

The EnvelopedCms.Encrypt(CmsRecipientCollection) method encrypts the contents of the CMS/PKCS #7 message by using the information for the specified list of recipients. The message is encrypted by using a message encryption key with a symmetric encryption algorithm such as triple DES. The message encryption key is then encrypted with the public key of each recipient.

Syntax

public void Encrypt (CmsRecipientCollection recipients)

Parameters

recipients
A System.Security.Cryptography.Pkcs.CmsRecipientCollection collection that represents the information for the list of recipients.

Remarks

The EnvelopedCms.Encrypt(CmsRecipientCollection) method does not cause the EnvelopedCms.RecipientInfos property to be populated.

Requirements

Namespace: System.Security.Cryptography.Pkcs
Assembly: System.Security (in System.Security.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0