Imports System
Imports System.IO
Imports System.Security.Cryptography
Public Class StoreKey
Public Shared Sub Main()
Dim cp As New CspParameters()
cp.KeyContainerName = "MyKeyContainerName"
Dim rsa As New RSACryptoServiceProvider(cp)
rsa.PersistKeyInCsp = False
Console.WriteLine("Key is : " & rsa.ToXmlString(True))
End Sub
End Class
|