System.Security.Cryptography.Pkcs.EnvelopedCms Members

The members of System.Security.Cryptography.Pkcs.EnvelopedCms are listed below.

See Also: Inherited members from System.Object

Public Constructors

The EnvelopedCms.#ctor constructor creates an instance of the System.Security.Cryptography.Pkcs.EnvelopedCms class.

The EnvelopedCms.#ctor(ContentInfo) constructor creates an instance of the System.Security.Cryptography.Pkcs.EnvelopedCms class by using the specified content information as the inner content type.

The EnvelopedCms.#ctor(ContentInfo, AlgorithmIdentifier) constructor creates an instance of the System.Security.Cryptography.Pkcs.EnvelopedCms class by using the specified content information and encryption algorithm. The specified content information is to be used as the inner content type.

The EnvelopedCms.#ctor(SubjectIdentifierType, ContentInfo) constructor creates an instance of the System.Security.Cryptography.Pkcs.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.

The EnvelopedCms.#ctor(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier) constructor creates an instance of the System.Security.Cryptography.Pkcs.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.

Public Properties

[read-only]
CertificatesSystem.Security.Cryptography.X509Certificates.X509Certificate2Collection.

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

[read-only]
ContentEncryptionAlgorithmAlgorithmIdentifier.

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

[read-only]
ContentInfoContentInfo.

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

[read-only]
RecipientInfosRecipientInfoCollection.

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

[read-only]
UnprotectedAttributesSystem.Security.Cryptography.CryptographicAttributeObjectCollection.

The EnvelopedCms.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 System.Security.Cryptography.Pkcs.EnvelopedCms object.

[read-only]
Versionint.

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

Public Methods

Decode(byte[])

The EnvelopedCms.Decode(Byte[]) method decodes the specified enveloped CMS/PKCS #7 message and resets all member variables in the System.Security.Cryptography.Pkcs.EnvelopedCms object.

Decrypt()

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

Decrypt(RecipientInfo)

The EnvelopedCms.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(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)

The EnvelopedCms.Decrypt(System.Security.Cryptography.X509Certificates.X509Certificate2Collection) method decrypts the contents of the decoded enveloped CMS/PKCS #7 message by using the specified certificate collection. The EnvelopedCms.Decrypt(System.Security.Cryptography.X509Certificates.X509Certificate2Collection) method searches the specified certificate collection and the My certificate store for the proper certificate to use for the decryption.

Decrypt(RecipientInfo, System.Security.Cryptography.X509Certificates.X509Certificate2Collection)

The EnvelopedCms.Decrypt(RecipientInfo, System.Security.Cryptography.X509Certificates.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 EnvelopedCms.Decrypt(RecipientInfo, System.Security.Cryptography.X509Certificates.X509Certificate2Collection) method searches the specified certificate collection and the My certificate store for the proper certificate to use for the decryption.

Encode() : byte[]

The EnvelopedCms.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 EnvelopedCms.Encrypt method encrypts the contents of the CMS/PKCS #7 message.

Encrypt(CmsRecipient)

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

Encrypt(CmsRecipientCollection)

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.