Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RSACng::Key Property

.NET Framework (current version)
 

Gets the key that will be used by the RSACng object for any cryptographic operation that it performs.

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public:
property CngKey^ Key {
	CngKey^ get();
	private: void set(CngKey^ value);
}

Property Value

Type: System.Security.Cryptography::CngKey^

The key used by the RSACng object.

The returned CngKey object is disposed if the key is reset, for instance by changing the CngKey::KeySize property, by using the RSA::ImportParameters to create a new key, or by disposing of the parent RSA object. Therefore, you should ensure that the key object is no longer used in these cases.

This CngKey object is not the same as the CngKey object passed to the RSACng constructor, if that constructor was used. However, it will point to the same CNG key.

SecurityPermission

for operating with unmanaged code. Associated enumeration: SecurityPermissionFlag::UnmanagedCode.

.NET Framework
Available since 4.6
Return to top
Show:
© 2017 Microsoft