Share via


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)

Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
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)

Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
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)

Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
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)

Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
Pkcs12SafeContents.cs
Source:
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

此实例为只读。

密钥导出失败。

另请参阅

适用于