RSA.ExportRSAPrivateKey Method

Definition

Exports the current key in the PKCS#1 RSAPrivateKey format.

C#
public virtual byte[] ExportRSAPrivateKey();

Returns

Byte[]

A byte array containing the PKCS#1 RSAPrivateKey representation of this key.

Exceptions

The key could not be exported.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1

See also