Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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); }
        }