fix for compilation with LTC_DEBUG

This commit is contained in:
Steffen Jaeckel 2017-05-03 12:37:24 +02:00
parent d936273711
commit 67ca1c0b9a
2 changed files with 4 additions and 4 deletions

View File

@ -295,13 +295,13 @@ int blake2bmac_test(void)
blake2bmac_process(&st, (unsigned char*)inp + 14, 1); blake2bmac_process(&st, (unsigned char*)inp + 14, 1);
blake2bmac_process(&st, (unsigned char*)inp + 15, ilen - 15); blake2bmac_process(&st, (unsigned char*)inp + 15, ilen - 15);
blake2bmac_done(&st, out, &olen); blake2bmac_done(&st, out, &olen);
if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC multi", i) != 0) return CRYPT_FAIL_TESTVECTOR; if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC multi", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
} }
/* process in one go */ /* process in one go */
blake2bmac_init(&st, olen, key, klen); blake2bmac_init(&st, olen, key, klen);
blake2bmac_process(&st, (unsigned char*)inp, ilen); blake2bmac_process(&st, (unsigned char*)inp, ilen);
blake2bmac_done(&st, out, &olen); blake2bmac_done(&st, out, &olen);
if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC single", i) != 0) return CRYPT_FAIL_TESTVECTOR; if (compare_testvector(out, olen, mac, mlen, "BLAKE2B MAC single", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
} }
return CRYPT_OK; return CRYPT_OK;
#endif #endif

View File

@ -295,13 +295,13 @@ int blake2smac_test(void)
blake2smac_process(&st, (unsigned char*)inp + 14, 1); blake2smac_process(&st, (unsigned char*)inp + 14, 1);
blake2smac_process(&st, (unsigned char*)inp + 15, ilen - 15); blake2smac_process(&st, (unsigned char*)inp + 15, ilen - 15);
blake2smac_done(&st, out, &olen); blake2smac_done(&st, out, &olen);
if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC multi", i) != 0) return CRYPT_FAIL_TESTVECTOR; if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC multi", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
} }
/* process in one go */ /* process in one go */
blake2smac_init(&st, olen, key, klen); blake2smac_init(&st, olen, key, klen);
blake2smac_process(&st, (unsigned char*)inp, ilen); blake2smac_process(&st, (unsigned char*)inp, ilen);
blake2smac_done(&st, out, &olen); blake2smac_done(&st, out, &olen);
if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC single", i) != 0) return CRYPT_FAIL_TESTVECTOR; if (compare_testvector(out, olen, mac, mlen, "BLAKE2S MAC single", ilen) != 0) return CRYPT_FAIL_TESTVECTOR;
} }
return CRYPT_OK; return CRYPT_OK;
#endif #endif