Ejemplo n.º 1
0
        public void DecodeBlocksFromBinaryTests(string codedFilePath, string key, string expected)
        {
            DES.DES des    = new DES.DES();
            var     actual = des.DecodeBlocksFromBinary(codedFilePath, key);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void DESDecodeTests(string text, string key, string expected)
        {
            DES.DES des    = new DES.DES();
            var     actual = des.DecodeBlocks(text, key);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
 private void ButtonDecript_Click(object sender, RoutedEventArgs e)
 {
     if (TextBoxEncriptedText.Text != "" && TextBoxKey.Text != "")
     {
         DES.DES toDecript = new DES.DES(TextBoxEncriptedText.Text, TextBoxKey.Text);
         TextBoxPlainText.Text = toDecript.Decript();
     }
 }
Ejemplo n.º 4
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     Decription = false;
     InputFilename = null;
     OutputFilename = null;
     Des = new DES.DES();
     Creator = null;
     mode = null;
 }