Пример #1
0
 //Дешифрование 3 методом - Двойной квадрат Уитстона
 private void ThirdDecrypt()
 {
     try
     {
         ThirdCipher thirdCipher = new ThirdCipher(textBox2.Text, textBox3.Text, textBox1.Text);
         label1.Text = thirdCipher.Decode();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Пример #2
0
 //Шифрование 3 методом - Двойной квадрат Уитстона
 private void ThirdEncrypt()
 {
     try
     {
         if (textBox1.Text.Contains('_'))
         {
             throw new Exception("Для повышения безопасности запрещена возможность ввода \"_\"");
         }
         ThirdCipher thirdCipher = new ThirdCipher(textBox2.Text, textBox3.Text, textBox1.Text);
         label1.Text = thirdCipher.Encode();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }