Beispiel #1
0
        private void TextBox1_KeyPress(object sender, KeyEventArgs e)
        {
            string text      = textBox1.Text;
            string encrypted = Salsa20.EncryptText(text);

            textBox2.Text = encrypted;
            textBox3.Text = Salsa20.EncryptText(encrypted);
        }
Beispiel #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (Salsa20.DecryptFile(textBox1.Text))
     {
         MessageBox.Show("Se guardo la imagen desencriptada.");
     }
     else
     {
         MessageBox.Show("No se pudo desencriptar la imagen.");
     }
 }
Beispiel #3
0
        private void TextBox2_KeyUp(object sender, KeyEventArgs e)
        {
            string encrypted = textBox2.Text;

            textBox3.Text = Salsa20.EncryptText(encrypted);
        }