public void EncipherTest() { uint[] v = new uint[2] { 3, 4 }; uint[] key = new uint[4] { 1, 2, 3, 4 }; EncryptionTEA.Encipher(v, key); EncryptionTEA.Deciper(v, key); CollectionAssert.AreEqual(v, new uint[2] { 3, 4 }); }
public void EncryptTest() { uint[] keys = { 12, 23, 34, 45 }; byte[] expected = new byte[] { 96, 97, 98, 99 }; var encrypter = new EncryptionTEA(); byte[] ciphertext = encrypter.Encrypt(expected, keys); byte[] actual = encrypter.Decrypt(ciphertext, keys); CollectionAssert.AreEqual(expected, actual); }