Upgrade libtomcrypt

This commit is contained in:
2025-10-24 19:33:21 +03:00
parent d770dd8df3
commit acc69bb8ad
157 changed files with 922 additions and 761 deletions

View File

@@ -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;
}