Share via


RSACng.Key 屬性

定義

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

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

屬性值

RSACng 物件所使用的金鑰。

備註

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

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

適用於