Exemple #1
0
        private void fromTextBoxToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            XORParams frm = new XORParams(true);

            frm.ShowDialog();

            string Key = frm.GetSecretKey();

            if (Key.Length == 0)
            {
                return;
            }

            textBox2.Text = Shifrator.CaesarRU(textBox1.Text, Int32.Parse(Key));
        }
Exemple #2
0
        private void fromTextBoxToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XORParams frm = new XORParams(false);

            frm.ShowDialog();

            string Key = frm.GetSecretKey();

            if (Key.Length == 0)
            {
                return;
            }

            textBox2.Text = Shifrator.XOR(textBox1.Text, Key);
        }
Exemple #3
0
        private void fromFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                XORParams frm = new XORParams(false);
                frm.ShowDialog();

                string Key = frm.GetSecretKey();
                if (Key.Length == 0)
                {
                    return;
                }

                using (StreamReader rdr = new StreamReader(openFileDialog1.FileName))
                {
                    textBox2.Text = Shifrator.XOR(rdr.ReadToEnd(), Key);
                }
            }
        }