語言

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物件與傳給CngKey建構子的物件不同RSACng,如果該建構子被使用的話。 不過,它會指向同一個CNG鑰匙。

適用於