예제 #1
0
        private void VigenereDecodeButton_Click(object sender, EventArgs e)
        {
            VigenereDecodeBox.Text = vigereMethod.Decode(VigenereEncodeBox.Text, VigenereKeyBox.Text, out log);
            OutputClass.WriteToFile(VigenereDecodeBox.Text, decodePath);
            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #2
0
        private void GammaDecodeButton_Click(object sender, EventArgs e)
        {
            GammaDecodeBox.Text = gammaMethod.Decode(GammaEncodeBox.Text, GammaKeyBox.Text, out log);
            OutputClass.WriteToFile(GammaDecodeBox.Text, decodePath);
            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #3
0
        private void DecodeButton_Click(object sender, EventArgs e)
        {
            TranspositionDecodeBox.Text = transpositionMetod.Decode(TranspositionEncodeBox.Text, TranspositionKeyBox.Text, out log);
            OutputClass.WriteToFile(TranspositionDecodeBox.Text, decodePath);
            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #4
0
        private void RSADecodeButton_Click(object sender, EventArgs e)
        {
            int TotalSum;

            RSADecodeBox.Text = rsaMethod.Decode(RSAEncodeBox.Text, KeyBox1.Text, KeyBox2.Text, out log, out TotalSum);
            OutputClass.WriteToFile(RSADecodeBox.Text, decodePath);
            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #5
0
        private void DecodeSpy_Click(object sender, EventArgs e)
        {
            string log;
            int    TotalSum;

            ChangeBox.Text = rsaMethod.Decode(ChangeBox.Text, KeyBox1.Text, KeyBox2.Text, out log, out TotalSum);
            TSBox2.Text    = TotalSum.ToString();

            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #6
0
        private void RSAEncodeButton_Click(object sender, EventArgs e)
        {
            OutputClass.WriteToFile(RSAInputBox.Text, inputPath);

            string key1, key2;
            int    TotalSum;

            RSAEncodeBox.Text = rsaMethod.Encode(RSAInputBox.Text, out key1, out key2, out log, out TotalSum);
            KeyBox1.Text      = key1; KeyBox2.Text = key2;
            OutputClass.WriteToFile(RSAEncodeBox.Text, encodePath);
            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            string key1, key2, log;
            int    TotalSum;

            ChangeBox.Text = rsaMethod.Encode(InputBox.Text, out key1, out key2, out log, out TotalSum);
            KeyBox1.Text   = key1;
            KeyBox2.Text   = key2;
            TSBox1.Text    = TotalSum.ToString();

            LogForm form = new LogForm(log);

            form.Show();
        }
예제 #8
0
        private void CheckButton_Click(object sender, EventArgs e)
        {
            string log;
            int    TotalSum;

            OutputBox.Text = rsaMethod.Decode(OutputBox.Text, KeyBox1.Text, KeyBox2.Text, out log, out TotalSum);
            TSBox2.Text    = TotalSum.ToString();

            LogForm form = new LogForm(log);

            form.Show();

            if (TSBox1.Text == TSBox2.Text)
            {
                MessageBox.Show("Сообщение не изменилось");
            }
            else
            {
                MessageBox.Show("Сообщение изменилось");
            }
        }