DSACng.Key 屬性

定義

取得金鑰,DSACng 物件會將這個金鑰用於其所執行的任何密碼編譯作業。

public:
 property System::Security::Cryptography::CngKey ^ Key { System::Security::Cryptography::CngKey ^ get(); };
public System.Security.Cryptography.CngKey Key { get; }
member this.Key : System.Security.Cryptography.CngKey
Public ReadOnly Property Key As CngKey

屬性值

CngKey

DSACng 物件執行密碼編譯作業使用的金鑰。

備註

CngKey如果重設索引鍵,例如,藉由變更 CngKey.KeySize 屬性、使用 DSACng.ImportParameters 方法來建立新索引鍵,或處置父 DSACng 物件,就會處置 物件。 因此,您應該確定這些情況下不再使用索引鍵物件。

如果使用該建構函式,這個 CngKey 物件與傳遞至 DSACng 建構函式的物件不同 CngKey 。 不過,它會指向相同的 CNG 金鑰。

適用於