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对象)来释放对象。 因此,应确保这些情况下不再使用密钥对象。

如果使用该DSACng构造函数,则此CngKey对象与传递给构造函数的对象不同CngKey。 但是,它将指向同一 CNG 键。

适用于