Creating a Public and Private Key using C#

public private keys

Following is a full sample (coding and details) on how to create both a public and a private key to an XML file using C#.

Requirements:

  • Folder named “Keys”
  • New Class named “PrivatePublicKey.cs”
  • An ASPX page with any name

Class PrivatePublicKey Imports

using System.IO;
using System.Security.Cryptography;

Continue reading