語言

EnvelopedCms 建構函式

定義

初始化 EnvelopedCms 類別的新執行個體。

多載

名稱 Description
EnvelopedCms()

初始化一個以預設值的新類別實例 EnvelopedCms 。

EnvelopedCms(ContentInfo)

初始化一個包含指定內容資訊的 EnvelopedCms 類別新實例。

EnvelopedCms(ContentInfo, AlgorithmIdentifier)

初始化類別的新實例 EnvelopedCms ,使用指定的對稱加密演算法與內容資訊。

EnvelopedCms(SubjectIdentifierType, ContentInfo)

在選擇收件人時,初始化一個包含指定內容資訊及主題識別機制的類別新實例 EnvelopedCms 。

EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier)

初始化該類別的新實例 EnvelopedCms ,並指定對稱加密演算法、內容資訊及主體識別機制,並依 UI 選擇接收者。

EnvelopedCms()

來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
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 框架中,預設的對稱加密演算法是由應用程式執行檔所依據的 .NET 框架版本決定的。 從 Framework 4.8 .NET開始,預設演算法為 CBC 模式下的 AES-256;在早期版本中,預設為 TripleDES(DES3-EDE) 在 CBC 模式下。

在 .NET Core 中,預設的對稱加密演算法由載入的 System.Security.Cryptography.Pkcs 組合版本決定。 從 System.Security.Cryptography.Pkcs NuGet 套件 4.6.0 版本開始,預設演算法為 AES-256 的 CBC 模式;在早期版本中,預設為 TripleDES(DES3-EDE)在 CBC 模式下。

適用於

EnvelopedCms(ContentInfo)

來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
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 框架中,預設的對稱加密演算法是由應用程式執行檔所依據的 .NET 框架版本決定的。 從 Framework 4.8 .NET開始,預設演算法為 CBC 模式下的 AES-256;在早期版本中,預設為 TripleDES(DES3-EDE) 在 CBC 模式下。

在 .NET Core 中,預設的對稱加密演算法由載入的 System.Security.Cryptography.Pkcs 組合版本決定。 從 System.Security.Cryptography.Pkcs NuGet 套件 4.6.0 版本開始,預設演算法為 AES-256 的 CBC 模式;在早期版本中,預設為 TripleDES(DES3-EDE)在 CBC 模式下。

另請參閱

適用於

EnvelopedCms(ContentInfo, AlgorithmIdentifier)

來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
EnvelopedCms.cs
來源:
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)

在選擇收件人時,初始化一個包含指定內容資訊及主題識別機制的類別新實例 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 框架中,預設的對稱加密演算法是由應用程式執行檔所依據的 .NET 框架版本決定的。 從 Framework 4.8 .NET開始,預設演算法為 CBC 模式下的 AES-256;在早期版本中,預設為 TripleDES(DES3-EDE) 在 CBC 模式下。

在 .NET Core 中,預設的對稱加密演算法由載入的 System.Security.Cryptography.Pkcs 組合版本決定。 從 System.Security.Cryptography.Pkcs NuGet 套件 4.6.0 版本開始,預設演算法為 AES-256 的 CBC 模式;在早期版本中,預設為 TripleDES(DES3-EDE)在 CBC 模式下。

另請參閱

適用於

EnvelopedCms(SubjectIdentifierType, ContentInfo, AlgorithmIdentifier)

初始化該類別的新實例 EnvelopedCms ,並指定對稱加密演算法、內容資訊及主體識別機制,並依 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)

參數

recipientIdentifierType
SubjectIdentifierType

這是列舉值之一,指定由 UI 提示選取的接收憑證所使用的主題識別碼方案。

contentInfo
ContentInfo

訊息內容要加密。

encryptionAlgorithm
AlgorithmIdentifier

對稱加密演算法在加密訊息內容時所使用的識別碼。

例外狀況

contentInfo或encryptionAlgorithm參數為 null。

適用於