Exemple #1
0
        private void btnDecode_Click_1(object sender, EventArgs e)
        {
            bmp = (Bitmap)imgPicture1.Image;
            String plaintext = "";

            if (txtFilelocation1.Text == String.Empty)
            {
                MessageBox.Show("Please choose image to Steganography!", "Warring!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (txtPass1.Text == String.Empty)
            {
                MessageBox.Show("Password is empty!!", "Warring!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            string textmahoa = LSB.extractText(bmp);

            try
            {
                plaintext = Mahoa.DecryptPass(textmahoa, txtPass1.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Password is wrong!");
                return;
            }
            txtDecode.Text = plaintext;
        }