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 Constructor (CngKey^)

.NET Framework (current version)
 

Initializes a new instance of the RSACng class with the specified key.

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

public:
RSACng(
	CngKey^ key
)

Parameters

key
Type: System.Security.Cryptography::CngKey^

The key to use for RSA operations.

Exception Condition
ArgumentException

key is not a valid RSA key.

ArgumentNullException

key is null.

The CngKey::AlgorithmGroup of key must be CngAlgorithmGroup::Rsa.

This constructor creates a copy of the key. Even if key is disposed, the copy of this key object in RSA remains alive.

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