private void trySymmetricEncryptDecrypt(NativeCipherImplemantation.Algorithm alg, NativeCipherImplemantation.Operation op) { StandartPswForm psw = new StandartPswForm(); if (DialogResult.Cancel == psw.ShowDialog(this)) { return; } textBox1.Text = NativeCipherImplemantation.SymmetricCipher(textBox1.Text, psw.Password, alg, op); }
private void tryRSAEncryptDecrypt(NativeCipherImplemantation.Operation op) { StandartPswForm psw = new StandartPswForm(); if (DialogResult.Cancel == psw.ShowDialog(this)) { return; } try{ textBox1.Text = NativeCipherImplemantation.RSACipher(textBox1.Text, psw.Password, op); } catch (Exception e) { MessageBox.Show(e.Message); } }