comparison dcrypt/crypto/ciphers/XTEA.d @ 6:5cb17e09d685

Minor edits to the unittests of hash functions and ciphers. Added AES and test vectors.
author Thomas Dixon <reikon@reikon.us>
date Sat, 16 Aug 2008 22:43:22 -0400
parents 71aae178f89a
children 23c62e28b3a4
comparison
equal deleted inserted replaced
5:cff9960a019c 6:5cb17e09d685
156 // Decryption 156 // Decryption
157 t.init(false, key); 157 t.init(false, key);
158 t.processBlock(Util.hexToUbytes(test_ciphertexts[i]), 0, buffer, 0); 158 t.processBlock(Util.hexToUbytes(test_ciphertexts[i]), 0, buffer, 0);
159 result = Util.ubytesToHex(buffer); 159 result = Util.ubytesToHex(buffer);
160 assert(result == test_plaintexts[i], 160 assert(result == test_plaintexts[i],
161 t.name~": ("~result~") != ("~test_ciphertexts[i]~")"); 161 t.name~": ("~result~") != ("~test_plaintexts[i]~")");
162 } 162 }
163 } 163 }
164 } 164 }
165 } 165 }