EnvelopedCms Class

 
System_CAPS_noteNote

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

The EnvelopedCms class represents a CMS/PKCS #7 structure for enveloped data.

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

System.Object
  System.Security.Cryptography.Pkcs.EnvelopedCms

[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public sealed class EnvelopedCms

NameDescription
System_CAPS_pubmethodEnvelopedCms()

The EnvelopedCms() constructor creates an instance of the EnvelopedCms class.

System_CAPS_pubmethodEnvelopedCms(ContentInfo)

The EnvelopedCms(ContentInfo) constructor creates an instance of the EnvelopedCms class by using the specified content information as the inner content type.

System_CAPS_pubmethodEnvelopedCms(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.

System_CAPS_pubmethodEnvelopedCms(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.

System_CAPS_pubmethodEnvelopedCms(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.

NameDescription
System_CAPS_pubpropertyCertificates

The Certificates property retrieves the set of certificates associated with the enveloped CMS/PKCS #7 message.

System_CAPS_pubpropertyContentEncryptionAlgorithm

The ContentEncryptionAlgorithm property retrieves the identifier of the algorithm used to encrypt the content.

System_CAPS_pubpropertyContentInfo

The ContentInfo property retrieves the inner content information for the enveloped CMS/PKCS #7 message.

System_CAPS_pubpropertyRecipientInfos

The RecipientInfos property retrieves the recipient information associated with the enveloped CMS/PKCS #7 message.

System_CAPS_pubpropertyUnprotectedAttributes

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.

System_CAPS_pubpropertyVersion

The Version property retrieves the version of the enveloped CMS/PKCS #7 message.

NameDescription
System_CAPS_pubmethodDecode(Byte[])

The Decode method decodes the specified enveloped CMS/PKCS #7 message and resets all member variables in the EnvelopedCms object.

System_CAPS_pubmethodDecrypt()

The Decrypt() method decrypts the contents of the decoded enveloped CMS/PKCS #7 message. The Decrypt() method searches the current user and computer My stores for the appropriate certificate and private key.

System_CAPS_pubmethodDecrypt(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.

System_CAPS_pubmethodDecrypt(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.

System_CAPS_pubmethodDecrypt(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.

System_CAPS_pubmethodEncode()

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.

System_CAPS_pubmethodEncrypt()

The Encrypt() method encrypts the contents of the CMS/PKCS #7 message.

System_CAPS_pubmethodEncrypt(CmsRecipient)

The Encrypt(CmsRecipient) method encrypts the contents of the CMS/PKCS #7 message by using the specified recipient information.

System_CAPS_pubmethodEncrypt(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.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

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

.NET Framework
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.

Return to top
Show: