Beispiel #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);
        }
Beispiel #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);
        }