private void fromTextBoxToolStripMenuItem4_Click(object sender, EventArgs e) { DESParams frm = new DESParams(); frm.ShowDialog(); string Key = frm.GetSecretKey(); string IV = frm.GetInitializingVector(); if (Key.Length > 0 && IV.Length > 0) { textBox2.Text = Shifrator.DESDecrypt(textBox1.Text, Key, IV); } }
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)); }
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); }
private void fromFileToolStripMenuItem4_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DESParams frm = new DESParams(); frm.ShowDialog(); string Key = frm.GetSecretKey(); string IV = frm.GetInitializingVector(); if (Key.Length > 0 && IV.Length > 0) { using (StreamReader rdr = new StreamReader(openFileDialog1.FileName)) { textBox2.Text = Shifrator.DESDecrypt(rdr.ReadToEnd(), Key, IV); } } } }
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); } } }
private void button3_Click(object sender, EventArgs e) { textBox1.Text = Shifrator.GenSecretKey(); textBox2.Text = Shifrator.GenInitializingVector(); }