语言

EnvelopedCms 构造函数

定义

初始化 EnvelopedCms 类的新实例。

重载

名称 说明
EnvelopedCms()

使用默认值初始化类的新实例 EnvelopedCms 。

EnvelopedCms(ContentInfo)

使用指定的内容信息初始化类的新实例 EnvelopedCms 。

EnvelopedCms(ContentInfo, AlgorithmIdentifier)

使用指定的对称加密算法和内容信息初始化类的新实例 EnvelopedCms 。

EnvelopedCms(SubjectIdentifierType, ContentInfo)

通过 UI 选择收件人时,使用指定的内容信息和主题标识符方案初始化类的新实例 EnvelopedCms 。

EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier)

通过 UI 选择收件人时,使用指定的对称加密算法、内容信息和主题标识符方案初始化类的新实例 EnvelopedCms 。

EnvelopedCms()

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

使用默认值初始化类的新实例 EnvelopedCms 。

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

注解

该 EnvelopedCms 类具有以下默认属性值:

财产 默认值
ContentInfo 内容类型:1.2.840.113549.1.7.1 (数据)
长度:零
ContentEncryptionAlgorithm 1.2.840.113549.3.7 (RSA_DES_EDE3_CBC) 或 2.16.840.1.101.3.4.1.42 (AES-256-CBC)

收件人的默认值 SubjectIdentifierType 为 IssuerAndSerialNumber。

在 .NET Framework 上,默认对称加密算法由生成应用程序可执行文件的 .NET Framework 版本确定。 从 .NET Framework 4.8 开始,默认算法在 CBC 模式下为 AES-256;在早期版本中,默认值为 CBC 模式下的 TripleDES (DES3-EDE)。

在 .NET Core 上,默认对称加密算法由加载的 System.Security.Cryptography.Pkcs 程序集的版本确定。 从 System.Security.Cryptography.Pkcs NuGet 包的 4.6.0 版本开始,默认算法是 CBC 模式下的 AES-256;在早期版本中,默认值为 CBC 模式下的 TripleDES (DES3-EDE)。

适用于

EnvelopedCms(ContentInfo)

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

使用指定的内容信息初始化类的新实例 EnvelopedCms 。

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)

参数

contentInfo
ContentInfo

要加密的消息内容。

例外

参数 contentInfo 为 null.

注解

收件人的默认值 SubjectIdentifierType 为 IssuerAndSerialNumber。

在 .NET Framework 上,默认对称加密算法由生成应用程序可执行文件的 .NET Framework 版本确定。 从 .NET Framework 4.8 开始,默认算法在 CBC 模式下为 AES-256;在早期版本中,默认值为 CBC 模式下的 TripleDES (DES3-EDE)。

在 .NET Core 上,默认对称加密算法由加载的 System.Security.Cryptography.Pkcs 程序集的版本确定。 从 System.Security.Cryptography.Pkcs NuGet 包的 4.6.0 版本开始,默认算法是 CBC 模式下的 AES-256;在早期版本中,默认值为 CBC 模式下的 TripleDES (DES3-EDE)。

另请参阅

适用于

EnvelopedCms(ContentInfo, AlgorithmIdentifier)

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

使用指定的对称加密算法和内容信息初始化类的新实例 EnvelopedCms 。

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)

参数

contentInfo
ContentInfo

要加密的消息内容。

encryptionAlgorithm
AlgorithmIdentifier

加密消息内容时要使用的对称加密算法的标识符。

例外

contentInfo或encryptionAlgorithm参数为 null.

注解

收件人的默认值 SubjectIdentifierType 为 IssuerAndSerialNumber。

另请参阅

适用于

EnvelopedCms(SubjectIdentifierType, ContentInfo)

通过 UI 选择收件人时,使用指定的内容信息和主题标识符方案初始化类的新实例 EnvelopedCms 。

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)

参数

recipientIdentifierType
SubjectIdentifierType

枚举值之一,指定用于 UI 提示选择的收件人证书的主题标识符方案。

contentInfo
ContentInfo

要加密的消息内容。

例外

参数 contentInfo 为 null.

注解

在 .NET Framework 上,默认对称加密算法由生成应用程序可执行文件的 .NET Framework 版本确定。 从 .NET Framework 4.8 开始,默认算法在 CBC 模式下为 AES-256;在早期版本中,默认值为 CBC 模式下的 TripleDES (DES3-EDE)。

在 .NET Core 上,默认对称加密算法由加载的 System.Security.Cryptography.Pkcs 程序集的版本确定。 从 System.Security.Cryptography.Pkcs NuGet 包的 4.6.0 版本开始,默认算法是 CBC 模式下的 AES-256;在早期版本中,默认值为 CBC 模式下的 TripleDES (DES3-EDE)。

另请参阅

适用于

EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier)

通过 UI 选择收件人时,使用指定的对称加密算法、内容信息和主题标识符方案初始化类的新实例 EnvelopedCms 。

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)

参数

recipientIdentifierType
SubjectIdentifierType

枚举值之一,指定用于 UI 提示选择的收件人证书的主题标识符方案。

contentInfo
ContentInfo

要加密的消息内容。

encryptionAlgorithm
AlgorithmIdentifier

加密消息内容时要使用的对称加密算法的标识符。

例外

contentInfo或encryptionAlgorithm参数为 null.

适用于