共用方式為


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.KeySize屬性、使用 建立RSA.ImportParameters新鍵,或丟棄父RSA物件,則會丟棄回傳CngKey的物件。 因此,你應該確保在這些情況下不再使用該金鑰物件。

這個CngKey物件與傳給RSACng建構子的物件不同CngKey,如果該建構子被使用的話。 不過,它會指向同一個CNG鑰匙。

適用於