EnvelopedCms Class
The EnvelopedCms class represents a CMS/PKCS #7 structure for enveloped data.
Assembly: System.Security (in System.Security.dll)
| Name | Description | |
|---|---|---|
![]() | EnvelopedCms() | The EnvelopedCms() constructor creates an instance of the EnvelopedCms class. |
![]() | EnvelopedCms(ContentInfo^) | The EnvelopedCms(ContentInfo^) constructor creates an instance of the EnvelopedCms class by using the specified content information as the inner content type. |
![]() | EnvelopedCms(ContentInfo^, AlgorithmIdentifier^) | The EnvelopedCms(ContentInfo^, AlgorithmIdentifier^) constructor creates an instance of the EnvelopedCms class by using the specified content information and encryption algorithm. The specified content information is to be used as the inner content type. |
![]() | EnvelopedCms(SubjectIdentifierType, ContentInfo^) | The EnvelopedCms(SubjectIdentifierType, ContentInfo^) constructor creates an instance of the EnvelopedCms class by using the specified subject identifier type and content information. The specified content information is to be used as the inner content type. |
![]() | EnvelopedCms(SubjectIdentifierType, ContentInfo^, AlgorithmIdentifier^) | The EnvelopedCms(SubjectIdentifierType, ContentInfo^, AlgorithmIdentifier^) constructor creates an instance of the EnvelopedCms class by using the specified subject identifier type, content information, and encryption algorithm. The specified content information is to be used as the inner content type. |
| Name | Description | |
|---|---|---|
![]() | Certificates | The Certificates property retrieves the set of certificates associated with the enveloped CMS/PKCS #7 message. |
![]() | ContentEncryptionAlgorithm | The ContentEncryptionAlgorithm property retrieves the identifier of the algorithm used to encrypt the content. |
![]() | ContentInfo | The ContentInfo property retrieves the inner content information for the enveloped CMS/PKCS #7 message. |
![]() | RecipientInfos | The RecipientInfos property retrieves the recipient information associated with the enveloped CMS/PKCS #7 message. |
![]() | UnprotectedAttributes | The UnprotectedAttributes property retrieves the unprotected (unencrypted) attributes associated with the enveloped CMS/PKCS #7 message. Unprotected attributes are not encrypted, and so do not have data confidentiality within an EnvelopedCms object. |
![]() | Version | The Version property retrieves the version of the enveloped CMS/PKCS #7 message. |
| Name | Description | |
|---|---|---|
![]() | Decode(array<Byte>^) | The Decode method decodes the specified enveloped CMS/PKCS #7 message and resets all member variables in the EnvelopedCms object. |
![]() | Decrypt() | |
![]() | Decrypt(RecipientInfo^) | 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. |
![]() | Decrypt(RecipientInfo^, X509Certificate2Collection^) | The Decrypt(RecipientInfo^, X509Certificate2Collection^) 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 and by using the specified certificate collection. The Decrypt(RecipientInfo^, X509Certificate2Collection^) method searches the specified certificate collection and the My certificate store for the proper certificate to use for the decryption. |
![]() | Decrypt(X509Certificate2Collection^) | The Decrypt(X509Certificate2Collection^) method decrypts the contents of the decoded enveloped CMS/PKCS #7 message by using the specified certificate collection. The Decrypt(X509Certificate2Collection^) method searches the specified certificate collection and the My certificate store for the proper certificate to use for the decryption. |
![]() | Encode() | The Encode method encodes the contents of the enveloped CMS/PKCS #7 message and returns it as an array of byte values. Encryption must be done before encoding. |
![]() | Encrypt() | The Encrypt() method encrypts the contents of the CMS/PKCS #7 message. |
![]() | Encrypt(CmsRecipient^) | The Encrypt(CmsRecipient^) method encrypts the contents of the CMS/PKCS #7 message by using the specified recipient information. |
![]() | Encrypt(CmsRecipientCollection^) | The 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. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
The Cryptographic Message Syntax RFC specifies the following MIME types and file name extensions for CMS/PKCS #7 messages with these content types.
Content type | MIME type | Extension |
|---|---|---|
envelopedData | application/pkcs7-mime | .p7m |
signedData | application/pkcs7-signature | .p7s.p7c |
Available since 2.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

