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 (Int32)

.NET Framework (current version)
 

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

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

public:
RSACng(
	int keySize
)

Parameters

keySize
Type: System::Int32

The size of the key to generate in bits.

Exception Condition
CryptographicException

keySize is not valid.

Valid key sizes range from 384 to 16,384 bits, in increments of 8. We recommend that a minimum size of 2,048 bits be used for all keys.

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