RSAExportExtensions public static class RSAExportExtensions RSA export key extensions.Support XML format import and export and PEM format. Documentation Code public static byte[] ExportPkcs8PublicKey(this RSA rsa) public static string ExportPrivateKey(this RSA rsa, RSAKeyType type, bool usePemFormat = false) Export RSA private key public static string ExportPublicKey(this RSA rsa, RSAKeyType type, bool usePemFormat = false) Export RSA public key