using System;
using System.IO;
using System.Security.Cryptography;
public class StoreKey
{
public static void Main()
{
CspParameters cp = new CspParameters();
cp.KeyContainerName = "MyKeyContainerName";
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(cp);
Console.WriteLine("Key is : \n" + rsa.ToXmlString(true));
}
}
|