don't use print_hex() from library

This commit is contained in:
Steffen Jaeckel
2017-06-08 11:55:07 +02:00
parent fe0b72ef51
commit 4e971a8518
5 changed files with 31 additions and 120 deletions
+2 -15
View File
@@ -262,15 +262,7 @@ int xts_test(void)
}
}
if (XMEMCMP(OUT, tests[i].CTX, tests[i].PTLEN)) {
#ifdef LTC_TEST_DBG
printf("\nTestcase #%d with original length %lu and half of it "
"%lu\n",
i, tests[i].PTLEN, len);
printf("\nencrypt\n");
print_hex("should", tests[i].CTX, tests[i].PTLEN);
print_hex("is", OUT, tests[i].PTLEN);
#endif
if (compare_testvector(OUT, tests[i].PTLEN, tests[i].CTX, tests[i].PTLEN, "XTS encrypt", i)) {
xts_done(&xts);
return CRYPT_FAIL_TESTVECTOR;
}
@@ -295,12 +287,7 @@ int xts_test(void)
}
}
if (XMEMCMP(OUT, tests[i].PTX, tests[i].PTLEN)) {
#ifdef LTC_TEST_DBG
printf("\ndecrypt\n");
print_hex("should", tests[i].PTX, tests[i].PTLEN);
print_hex("is", OUT, tests[i].PTLEN);
#endif
if (compare_testvector(OUT, tests[i].PTLEN, tests[i].PTX, tests[i].PTLEN, "XTS decrypt", i)) {
xts_done(&xts);
return CRYPT_FAIL_TESTVECTOR;
}