DSACng.Key 属性
定义
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
属性值
由 DSACng 对象用来执行加密操作的密钥。The key used by the DSACng object to perform cryptographic operations.
注解
CngKey如果重置密钥,则会释放该对象,例如通过更改 CngKey.KeySize 属性、使用 DSACng.ImportParameters 方法创建新密钥或释放父 DSACng 对象。The CngKey object is disposed if the key is reset, for instance by changing the CngKey.KeySize property, by using the DSACng.ImportParameters method to create a new key, or by disposing the parent DSACng object. 因此,应确保在这些情况下不会再使用该密钥对象。Therefore, you should ensure that the key object is no longer used in these cases.
CngKey CngKey 如果使用了该构造函数,则此对象与传递给构造函数的对象不同 DSACng 。This CngKey object is not the same as the CngKey object passed to the DSACng constructor, if that constructor was used. 但是,它会指向同一 CNG 密钥。However, it will point to the same CNG key.