Esempio n. 1
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);
        }
Esempio n. 2
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;
        }