Example #1
0
 private void decryptButton_Click(object sender, EventArgs e)
 {
     if (currentMode == Mode.Image && image != null)
     {
         string text;
         if (random.Checked || randomM2.Checked)
         {
             text = Test1.GetDecryptedTextFromImage(image);
         }
         else
         {
             text = Test1.GetDecryptedTextFromImageLinear(image);
         }
         if (text != null)
         {
             textBox.Text = text;
             OutputConsole.Write("Text decrypted");
         }
         else
         {
             //MessageBox.Show("This image doesn't have an encrypted text or an error occurred");
         }
     }
     if (currentMode == Mode.Audio && audio != null)
     {
         string text;
         if (random.Checked)
         {
             text = AudioSteganography.DecryptText(audio);
         }
         else
         {
             text = AudioSteganography.DecryptTextLinear(audio);
         }
         if (text != null)
         {
             textBox.Text = text;
             OutputConsole.Write("Text decrypted");
         }
     }
 }