Ejemplo n.º 1
0
        public void DecodeBlocksFromBinaryTests(string codedFilePath, string key, string expected)
        {
            DataEncryptionStandard des = new DataEncryptionStandard();
            var actual = des.convertBinaryToAscii(des.ConvertHexToBits(des.DecryptFromFile(codedFilePath, key)));

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

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
        public void CodeBlocksFromBinaryTests(string decodedFilePath, string key, string expected)
        {
            DataEncryptionStandard des = new DataEncryptionStandard();
            var actual = des.EncryptFromFile(decodedFilePath, key);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 4
0
        public void DESCodeTests(string text, string key, string expected)
        {
            DataEncryptionStandard des = new DataEncryptionStandard();
            var actual = des.Encrypt(text, key);

            Assert.AreEqual(expected, actual);
        }