Esempio n. 1
0
 private void CreateNewKey()
 {
     RsaKey = new RSAKey();
     if (!RsaKey.ReadConfig("config.rsa"))
     {
         RsaKey = RSAKeyGenerator.GenerateKeyPair(1024);
     }
     ReadKeysFromFile();
 }
Esempio n. 2
0
 private void GenerateKey_Handler(object sender, System.Windows.RoutedEventArgs e)
 {
     RsaKey = RSAKeyGenerator.GenerateKeyPair(keyLengths[KeyLengthBox.SelectedIndex]);
     ReadKeysFromFile();
 }