RSACng.Key 属性 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取将由 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.CngKeyPublic ReadOnly Property Key As CngKey属性值
RSACng 对象使用的密钥。
注解
如果重置了密钥,则释放返回 CngKey 的对象,例如通过更改 CngKey.KeySize 属性、使用 RSA.ImportParameters 创建新键或释放父 RSA 对象。 因此,应确保这些情况下不再使用密钥对象。
如果使用了该构造函数,则此 CngKey 对象与 CngKey 传递给 RSACng 构造函数的对象不同。 但是,它将指向同一 CNG 密钥。