共用方式為


Pkcs12SafeContents.AddShroudedKey 方法

定義

多載

AddShroudedKey(AsymmetricAlgorithm, String, PbeParameters)

透過字串中的字元型密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

AddShroudedKey(AsymmetricAlgorithm, ReadOnlySpan<Char>, PbeParameters)

透過範圍中的字元型密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

AddShroudedKey(AsymmetricAlgorithm, Byte[], PbeParameters)

透過陣列中的位元組型密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

AddShroudedKey(AsymmetricAlgorithm, ReadOnlySpan<Byte>, PbeParameters)

透過範圍中以位元組為基礎之密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

AddShroudedKey(AsymmetricAlgorithm, String, PbeParameters)

來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs

透過字串中的字元型密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

public:
 System::Security::Cryptography::Pkcs::Pkcs12ShroudedKeyBag ^ AddShroudedKey(System::Security::Cryptography::AsymmetricAlgorithm ^ key, System::String ^ password, System::Security::Cryptography::PbeParameters ^ pbeParameters);
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey (System.Security.Cryptography.AsymmetricAlgorithm key, string? password, System.Security.Cryptography.PbeParameters pbeParameters);
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey (System.Security.Cryptography.AsymmetricAlgorithm key, string password, System.Security.Cryptography.PbeParameters pbeParameters);
member this.AddShroudedKey : System.Security.Cryptography.AsymmetricAlgorithm * string * System.Security.Cryptography.PbeParameters -> System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag
Public Function AddShroudedKey (key As AsymmetricAlgorithm, password As String, pbeParameters As PbeParameters) As Pkcs12ShroudedKeyBag

參數

key
AsymmetricAlgorithm

要新增的非對稱私密金鑰。

password
String

加密金鑰產製原料時要使用的密碼。

pbeParameters
PbeParameters

加密金鑰產製原料時要使用的密碼型加密 (PBE) 參數。

傳回

已新增至 SafeContents 的包執行個體。

例外狀況

key 參數為 null

此執行個體是唯讀項目。

金鑰匯入失敗。

另請參閱

適用於

AddShroudedKey(AsymmetricAlgorithm, ReadOnlySpan<Char>, PbeParameters)

來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs

透過範圍中的字元型密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

public:
 System::Security::Cryptography::Pkcs::Pkcs12ShroudedKeyBag ^ AddShroudedKey(System::Security::Cryptography::AsymmetricAlgorithm ^ key, ReadOnlySpan<char> password, System::Security::Cryptography::PbeParameters ^ pbeParameters);
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey (System.Security.Cryptography.AsymmetricAlgorithm key, ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters);
member this.AddShroudedKey : System.Security.Cryptography.AsymmetricAlgorithm * ReadOnlySpan<char> * System.Security.Cryptography.PbeParameters -> System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag
Public Function AddShroudedKey (key As AsymmetricAlgorithm, password As ReadOnlySpan(Of Char), pbeParameters As PbeParameters) As Pkcs12ShroudedKeyBag

參數

key
AsymmetricAlgorithm

要新增的非對稱私密金鑰。

password
ReadOnlySpan<Char>

加密金鑰產製原料時要使用的密碼。

pbeParameters
PbeParameters

加密金鑰產製原料時要使用的密碼型加密 (PBE) 參數。

傳回

已新增至 SafeContents 的包執行個體。

例外狀況

key 參數為 null

此執行個體是唯讀項目。

金鑰匯入失敗。

另請參閱

適用於

AddShroudedKey(AsymmetricAlgorithm, Byte[], PbeParameters)

來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs

透過陣列中的位元組型密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

public:
 System::Security::Cryptography::Pkcs::Pkcs12ShroudedKeyBag ^ AddShroudedKey(System::Security::Cryptography::AsymmetricAlgorithm ^ key, cli::array <System::Byte> ^ passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters);
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey (System.Security.Cryptography.AsymmetricAlgorithm key, byte[]? passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters);
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey (System.Security.Cryptography.AsymmetricAlgorithm key, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters);
member this.AddShroudedKey : System.Security.Cryptography.AsymmetricAlgorithm * byte[] * System.Security.Cryptography.PbeParameters -> System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag
Public Function AddShroudedKey (key As AsymmetricAlgorithm, passwordBytes As Byte(), pbeParameters As PbeParameters) As Pkcs12ShroudedKeyBag

參數

key
AsymmetricAlgorithm

要新增的非對稱私密金鑰。

passwordBytes
Byte[]

加密金鑰內容時要用作密碼的位元組。

pbeParameters
PbeParameters

加密金鑰產製原料時要使用的密碼型加密 (PBE) 參數。

傳回

已新增至 SafeContents 的包執行個體。

例外狀況

key 參數為 null

此執行個體是唯讀項目。

金鑰匯入失敗。

另請參閱

適用於

AddShroudedKey(AsymmetricAlgorithm, ReadOnlySpan<Byte>, PbeParameters)

來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs
來源:
Pkcs12SafeContents.cs

透過範圍中以位元組為基礎之密碼的新 Pkcs12ShroudedKeyBag,將加密的非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

public:
 System::Security::Cryptography::Pkcs::Pkcs12ShroudedKeyBag ^ AddShroudedKey(System::Security::Cryptography::AsymmetricAlgorithm ^ key, ReadOnlySpan<System::Byte> passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters);
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey (System.Security.Cryptography.AsymmetricAlgorithm key, ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters);
member this.AddShroudedKey : System.Security.Cryptography.AsymmetricAlgorithm * ReadOnlySpan<byte> * System.Security.Cryptography.PbeParameters -> System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag
Public Function AddShroudedKey (key As AsymmetricAlgorithm, passwordBytes As ReadOnlySpan(Of Byte), pbeParameters As PbeParameters) As Pkcs12ShroudedKeyBag

參數

key
AsymmetricAlgorithm

要新增的非對稱私密金鑰。

passwordBytes
ReadOnlySpan<Byte>

加密金鑰內容時要用作密碼的位元組。

pbeParameters
PbeParameters

加密金鑰產製原料時要使用的密碼型加密 (PBE) 參數。

傳回

已新增至 SafeContents 的包執行個體。

例外狀況

key 參數為 null

此執行個體是唯讀項目。

金鑰匯入失敗。

另請參閱

適用於