Editar

Compartir a través de


EnvelopedCms Constructors

Definition

Initializes a new instance of the EnvelopedCms class.

Overloads

EnvelopedCms()

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

EnvelopedCms(ContentInfo)

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

EnvelopedCms(ContentInfo, AlgorithmIdentifier)

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

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)

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()

Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs

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.

Applies to

EnvelopedCms(ContentInfo)

Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs

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
Public Sub New (contentInfo As ContentInfo)

Parameters

contentInfo
ContentInfo

The message content to encrypt.

Exceptions

The contentInfo parameter is null.

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

Applies to

EnvelopedCms(ContentInfo, AlgorithmIdentifier)

Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs
Source:
EnvelopedCms.cs

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
Public Sub New (contentInfo As ContentInfo, encryptionAlgorithm As AlgorithmIdentifier)

Parameters

contentInfo
ContentInfo

The message content to encrypt.

encryptionAlgorithm
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

Applies to

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
Public Sub New (recipientIdentifierType As SubjectIdentifierType, contentInfo As ContentInfo)

Parameters

recipientIdentifierType
SubjectIdentifierType

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

contentInfo
ContentInfo

The message content to encrypt.

Exceptions

The contentInfo parameter is null.

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

Applies to

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
Public Sub New (recipientIdentifierType As SubjectIdentifierType, contentInfo As ContentInfo, encryptionAlgorithm As AlgorithmIdentifier)

Parameters

recipientIdentifierType
SubjectIdentifierType

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

contentInfo
ContentInfo

The message content to encrypt.

encryptionAlgorithm
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