<PackageReference Include="System.Security.Cryptography.Cng" Version="5.0.0-preview.8.20407.11" />

System.Security.Cryptography.RSACng

public sealed class RSACng : RSA
Provides a Cryptography Next Generation (CNG) implementation of the RSA algorithm.
public CngKey Key { get; }

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

public RSACng()

Initializes a new instance of the RSACng class with a random 2,048-bit key pair.

public RSACng(int keySize)

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

public RSACng(CngKey key)

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