EnvelopedCms EnvelopedCms EnvelopedCms EnvelopedCms Constructors

Definition

Overloads

EnvelopedCms() EnvelopedCms() EnvelopedCms()

Initializes a new instance of the EnvelopedCms class with default values.

EnvelopedCms(ContentInfo) EnvelopedCms(ContentInfo) EnvelopedCms(ContentInfo)

Initializes a new instance of the EnvelopedCms class with specified content information.

EnvelopedCms(ContentInfo, AlgorithmIdentifier) EnvelopedCms(ContentInfo, AlgorithmIdentifier) EnvelopedCms(ContentInfo, AlgorithmIdentifier)

Initializes a new instance of the EnvelopedCms class with a specified symmetric encryption algorithm and content information.

EnvelopedCms(SubjectIdentifierType, ContentInfo) EnvelopedCms(SubjectIdentifierType, ContentInfo) EnvelopedCms(SubjectIdentifierType, ContentInfo)

Initializes a new instance of the EnvelopedCms class with specified content information and a subject identifier scheme when selecting recipients by UI.

EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier) EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier) EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier)

Initializes a new instance of the EnvelopedCms class with specified a symmetric encryption algorithm, content information, and a subject identifier scheme when selecting recipients by UI.

EnvelopedCms() EnvelopedCms() EnvelopedCms()

Initializes a new instance of the EnvelopedCms class with default values.

public:
 EnvelopedCms();
public EnvelopedCms ();
Public Sub New ()

Remarks

The EnvelopedCms class has the following default property values:

Property Default value
ContentInfo Content Type: 1.2.840.113549.1.7.1 (data)
Length: zero
ContentEncryptionAlgorithm 1.2.840.113549.3.7 (RSA_DES_EDE3_CBC) or 2.16.840.1.101.3.4.1.42 (AES-256-CBC)

The default SubjectIdentifierType for recipients is IssuerAndSerialNumber.

On .NET Framework, the default symmetric encryption algorithm is determined by the version of the .NET Framework that the application executable was built against. Starting with .NET Framework 4.8, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.

On .NET Core, the default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.

EnvelopedCms(ContentInfo) EnvelopedCms(ContentInfo) EnvelopedCms(ContentInfo)

Initializes a new instance of the EnvelopedCms class with specified content information.

public:
 EnvelopedCms(System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo);
public EnvelopedCms (System.Security.Cryptography.Pkcs.ContentInfo contentInfo);
new System.Security.Cryptography.Pkcs.EnvelopedCms : System.Security.Cryptography.Pkcs.ContentInfo -> System.Security.Cryptography.Pkcs.EnvelopedCms

Parameters

contentInfo
ContentInfo ContentInfo ContentInfo ContentInfo

The message content to encrypt.

Exceptions

Remarks

The default SubjectIdentifierType for recipients is IssuerAndSerialNumber.

On .NET Framework, the default symmetric encryption algorithm is determined by the version of the .NET Framework that the application executable was built against. Starting with .NET Framework 4.8, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.

On .NET Core, the default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.

See also

EnvelopedCms(ContentInfo, AlgorithmIdentifier) EnvelopedCms(ContentInfo, AlgorithmIdentifier) EnvelopedCms(ContentInfo, AlgorithmIdentifier)

Initializes a new instance of the EnvelopedCms class with a specified symmetric encryption algorithm and content information.

public:
 EnvelopedCms(System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo, System::Security::Cryptography::Pkcs::AlgorithmIdentifier ^ encryptionAlgorithm);
public EnvelopedCms (System.Security.Cryptography.Pkcs.ContentInfo contentInfo, System.Security.Cryptography.Pkcs.AlgorithmIdentifier encryptionAlgorithm);
new System.Security.Cryptography.Pkcs.EnvelopedCms : System.Security.Cryptography.Pkcs.ContentInfo * System.Security.Cryptography.Pkcs.AlgorithmIdentifier -> System.Security.Cryptography.Pkcs.EnvelopedCms

Parameters

contentInfo
ContentInfo ContentInfo ContentInfo ContentInfo

The message content to encrypt.

encryptionAlgorithm
AlgorithmIdentifier AlgorithmIdentifier AlgorithmIdentifier AlgorithmIdentifier

The identifier for the symmetric encryption algorithm to use when encrypting the message content.

Exceptions

The contentInfo or encryptionAlgorithm parameter is null.

Remarks

The default SubjectIdentifierType for recipients is IssuerAndSerialNumber.

See also

EnvelopedCms(SubjectIdentifierType, ContentInfo) EnvelopedCms(SubjectIdentifierType, ContentInfo) EnvelopedCms(SubjectIdentifierType, ContentInfo)

Initializes a new instance of the EnvelopedCms class with specified content information and a subject identifier scheme when selecting recipients by UI.

public:
 EnvelopedCms(System::Security::Cryptography::Pkcs::SubjectIdentifierType recipientIdentifierType, System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo);
public EnvelopedCms (System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo contentInfo);
new System.Security.Cryptography.Pkcs.EnvelopedCms : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.Pkcs.ContentInfo -> System.Security.Cryptography.Pkcs.EnvelopedCms

Parameters

recipientIdentifierType
SubjectIdentifierType SubjectIdentifierType SubjectIdentifierType SubjectIdentifierType

One of the enumeration values that specifies the subject identifier scheme to use for recipient certificates selected by a UI prompt.

contentInfo
ContentInfo ContentInfo ContentInfo ContentInfo

The message content to encrypt.

Exceptions

Remarks

On .NET Framework, the default symmetric encryption algorithm is determined by the version of the .NET Framework that the application executable was built against. Starting with .NET Framework 4.8, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.

On .NET Core, the default symmetric encryption algorithm is determined by the version of the System.Security.Cryptography.Pkcs assembly that is loaded. Starting with the 4.6.0 version of the System.Security.Cryptography.Pkcs NuGet package, the default algorithm is AES-256 in CBC mode; in prior versions, the default is TripleDES (DES3-EDE) in CBC mode.

See also

EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier) EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier) EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier)

Initializes a new instance of the EnvelopedCms class with specified a symmetric encryption algorithm, content information, and a subject identifier scheme when selecting recipients by UI.

public:
 EnvelopedCms(System::Security::Cryptography::Pkcs::SubjectIdentifierType recipientIdentifierType, System::Security::Cryptography::Pkcs::ContentInfo ^ contentInfo, System::Security::Cryptography::Pkcs::AlgorithmIdentifier ^ encryptionAlgorithm);
public EnvelopedCms (System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.Pkcs.ContentInfo contentInfo, System.Security.Cryptography.Pkcs.AlgorithmIdentifier encryptionAlgorithm);
new System.Security.Cryptography.Pkcs.EnvelopedCms : System.Security.Cryptography.Pkcs.SubjectIdentifierType * System.Security.Cryptography.Pkcs.ContentInfo * System.Security.Cryptography.Pkcs.AlgorithmIdentifier -> System.Security.Cryptography.Pkcs.EnvelopedCms

Parameters

recipientIdentifierType
SubjectIdentifierType SubjectIdentifierType SubjectIdentifierType SubjectIdentifierType

One of the enumeration values that specifies the subject identifier scheme to use for recipient certificates selected by a UI prompt.

contentInfo
ContentInfo ContentInfo ContentInfo ContentInfo

The message content to encrypt.

encryptionAlgorithm
AlgorithmIdentifier AlgorithmIdentifier AlgorithmIdentifier AlgorithmIdentifier

The identifier for the symmetric encryption algorithm to use when encrypting the message content.

Exceptions

The contentInfo or encryptionAlgorithm parameter is null.

Applies to