Example #1
0
        private void decrypt_text_button_Click(object sender, EventArgs e)
        {
            plain_text_box.Clear();

            Cypher cypher = new Cypher();
            plain_text_box.Text = cypher.decrypt_string(cypher_text_box.Text, password_cypher_box.Text);
        }
Example #2
0
        private void encrypt_text_button_Click(object sender, EventArgs e)
        {
            cypher_text_box.Clear();
            plain_text_box.Clear();

            Cypher cypher = new Cypher();
            cypher_text_box.Text = cypher.encrypt_string(input_text_box.Text, password_in_box.Text);
        }
Example #3
0
        private void decrypt_line_button_Click(object sender, EventArgs e)
        {
            plain_text_box.Clear();

            Cypher cypher = new Cypher();
            int counter = 0;
            string[] plainstring = new string[cypher_text_box.Lines.Length];

            foreach (string line in cypher_text_box.Lines)
            {
                if (line.Length > 0)
                    plainstring[counter] = cypher.decrypt_string(line, password_cypher_box.Text);
                else
                    plainstring[counter] = "";

                counter++;
            }

            plain_text_box.Lines = plainstring;
        }
Example #4
0
        private void encrypt_line_button_Click(object sender, EventArgs e)
        {
            cypher_text_box.Clear();
            plain_text_box.Clear();

            Cypher cypher = new Cypher();
            int counter = 0;
            string [] cypherstring = new string [input_text_box.Lines.Length];
            
            foreach (string line in input_text_box.Lines)
            {
                if (line.Length > 0)
                    cypherstring[counter] = cypher.encrypt_string(line, password_in_box.Text);
                else
                    cypherstring[counter] = "";

                counter++;
            }

            cypher_text_box.Lines = cypherstring;
        }