System.Security 2.0.0.0 4.0.0.0 System.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

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

- Constructor
  2.0.0.0
  4.0.0.0

  The class has the following default property values.

  Property

  Default value

  1.2.840.113549.1.7.1 (data)Length: zero

  1.2.840.113549.3.7 (RSA_DES_EDE3_CBC)

  The default for recipients is .

  The constructor creates an instance of the class.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  For the default property values used with this constructor, see .

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

- Constructor
  2.0.0.0
  4.0.0.0

  For the default property values used with this constructor, see .

  The constructor creates an instance of the class by using the specified content information and encryption algorithm. The specified content information is to be used as the inner content type.

  A object that represents the content and its type.
  An object that specifies the encryption algorithm.
- Constructor
  2.0.0.0
  4.0.0.0

  For the default property values used with this constructor, see .

  Subjects can be identified by either the issuer and serial number of their public key certificate or by the key identifier of their public key certificate.

  The constructor creates an instance of the class by using the specified subject identifier type and content information. The specified content information is to be used as the inner content type.

  A member of the enumeration that specifies the means of identifying the recipient.
  A object that represents the content and its type.
- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  The constructor creates an instance of the 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.

  A member of the enumeration that specifies the means of identifying the recipient.
  A object that represents the content and its type.
  An object that specifies the encryption algorithm.
- Property
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.X509Certificates.X509Certificate2Collection To be added. To be added.

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

- Property
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.Pkcs.AlgorithmIdentifier To be added.

  If an algorithm identifier was not set in a constructor, this property contains the default value. For the default property values used with the class, see .

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

- Property
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.Pkcs.ContentInfo To be added.

  If you call any of the decrypt methods, such as , before viewing this property, the content returned is encrypted.

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

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  This method should be called before or any other EnvelopedCms.Decrypt method.

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

  An array of byte values that represent the information to be decoded.
- Method
  2.0.0.0
  4.0.0.0
  System.Void

  should be called before or any other method.

  The method does not search the computer My store if it is inaccessible.

  ## .NET Framework Security

  The following permissions are required to access the decryption key:

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

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  ## .NET Framework Security

  The following permissions are required to access the decryption key:

  The 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.

  A object that represents the recipient information that identifies the certificate associated with the private key to use for the decryption.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  ## .NET Framework Security

  The following permissions are required to access the decryption key:

  The method decrypts the contents of the decoded enveloped CMS/PKCS #7 message by using the specified certificate collection. The method searches the specified certificate collection and the My certificate store for the proper certificate to use for the decryption.

  An collection that represents additional certificates to use for the decryption. The method searches this certificate collection and the My certificate store for the proper certificate to use for the decryption.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  ## .NET Framework Security

  The following permissions are required to access the decryption key:

  The 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 method searches the specified certificate collection and the My certificate store for the proper certificate to use for the decryption.

  A object that represents the recipient information to use for the decryption. An collection that represents additional certificates to use for the decryption. The method searches this certificate collection and the My certificate store for the proper certificate to use for the decryption.
- Method
  2.0.0.0
  4.0.0.0
  System.Byte[]

  or another method must be called before this method.

  The method does not cause the property to be populated.

  The 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.

  If the method succeeds, the method returns an array of byte values that represent the encoded information.

  If the method fails, it throws an exception.

- Method
  2.0.0.0
  4.0.0.0
  System.Void

  This method displays a user interface in which you choose the recipients for whom to encrypt the message. This requires that the current process is running in user interactive mode, meaning that the property is set to true. A process is normally in user interactive mode unless it is a service process or running inside a Web application.

  The user interface will only present certificates that are within their validity period and that have key encipherment or key agreement included in their key usage.

  The method does not cause the property to be populated.

  ## .NET Framework Security

  The following permissions are required to display the user interface:

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

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method does not cause the property to be populated.

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

  A object that represents the recipient information.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method does not cause the property to be populated.

  The 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.

  A collection that represents the information for the list of recipients.
- Property
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.Pkcs.RecipientInfoCollection To be added.

  Although this property is read-only, a modification to the objects in the can be done by using their properties.

  The property is not populated as a result of calling the method nor any of the overloaded EnvelopedCms.Encrypt methods.

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

- Property
  2.0.0.0
  4.0.0.0
  System.Security.Cryptography.CryptographicAttributeObjectCollection To be added. To be added.

  The 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 object.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The version determines whether the message is a PKCS #7 message or a Cryptographic Message Syntax (CMS) message. CMS is a newer superset of PKCS #7.

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