Upgrade libtomcrypt
This commit is contained in:
@@ -150,7 +150,7 @@ int tea_test(void)
|
||||
symmetric_key skey;
|
||||
size_t i;
|
||||
int err, y;
|
||||
for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) {
|
||||
for (i = 0; i < LTC_ARRAY_SIZE(tests); i++) {
|
||||
zeromem(&skey, sizeof(skey));
|
||||
|
||||
l = sizeof(key);
|
||||
@@ -166,8 +166,8 @@ int tea_test(void)
|
||||
tea_ecb_encrypt(ptct[0], tmp[0], &skey);
|
||||
tea_ecb_decrypt(tmp[0], tmp[1], &skey);
|
||||
|
||||
if (compare_testvector(tmp[0], 8, ptct[1], 8, "TEA Encrypt", (int)i) != 0 ||
|
||||
compare_testvector(tmp[1], 8, ptct[0], 8, "TEA Decrypt", (int)i) != 0) {
|
||||
if (compare_testvector(tmp[0], 8, ptct[1], 8, "TEA Encrypt", i) != 0 ||
|
||||
compare_testvector(tmp[1], 8, ptct[0], 8, "TEA Decrypt", i) != 0) {
|
||||
return CRYPT_FAIL_TESTVECTOR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user