共用方式為


Pkcs12SafeContents.AddKeyUnencrypted(AsymmetricAlgorithm) 方法

定義

透過新的 Pkcs12KeyBag 將非對稱私密金鑰新增至 SafeContents,並傳回新建立的包執行個體。

public:
 System::Security::Cryptography::Pkcs::Pkcs12KeyBag ^ AddKeyUnencrypted(System::Security::Cryptography::AsymmetricAlgorithm ^ key);
public System.Security.Cryptography.Pkcs.Pkcs12KeyBag AddKeyUnencrypted (System.Security.Cryptography.AsymmetricAlgorithm key);
member this.AddKeyUnencrypted : System.Security.Cryptography.AsymmetricAlgorithm -> System.Security.Cryptography.Pkcs.Pkcs12KeyBag
Public Function AddKeyUnencrypted (key As AsymmetricAlgorithm) As Pkcs12KeyBag

參數

key
AsymmetricAlgorithm

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

傳回

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

例外狀況

key 參數為 null

此執行個體是唯讀項目。

金鑰匯入失敗。

適用於

另請參閱