Exemplo n.º 1
0
        public ActionResult Index()
        {
            IndexViewModel ivm  = new IndexViewModel();
            var            keys = RsaGenerator.GenerateKeys();

            ivm.PrivateRSAKey = keys.PrivateKey;
            ivm.PublicRSAKey  = keys.PublicKey;
            return(View(ivm));
        }
 public void TestMethod1()
 {
     var rsaGen = new RsaGenerator();
     var rsa    = rsaGen.GetRsa();
 }
Exemplo n.º 3
0
        public static string CreatePrivateKey()
        {
            var rsaGenerator = new RsaGenerator();

            return(rsaGenerator.CreatePrivateKeyRsa());
        }