Exemplo n.º 1
0
 /// <summary>
 /// Generates new RSA-keys and grasshopper-key. Implements <see cref="IRSA.GenerateKey"/>.
 /// </summary>
 public void GenerateKey()
 {
     rsa             = new RSACryptoServiceProvider();
     Keys.PublicKey  = rsa.ToXmlString(false);
     Keys.PrivateKey = rsa.ToXmlString(true);
     grasshopper     = new Grasshopper();
     grasshopper.GenerateKey();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Overloaded Implementation of Dispose. Clean up any resources being used.
 /// </summary>
 /// <param name="disposing">True if managed resources should be disposed; otherwise, false.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             if (rsa != null)
             {
                 rsa = null;
             }
             if (grasshopper != null)
             {
                 grasshopper = null;
             }
             disposed = true;
         }
     }
 }