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.
Assembly: System.Core (in System.Core.dll)
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
Available since 4.6
Show: