#include <stdio.h>
+#include <mLib/macros.h>
#include <mLib/report.h>
#include <mLib/testrig.h>
sha3_done(&ctx, d.buf);
}
- if (memcmp(d.buf, out->buf, out->len) != 0) {
+ if (MEMCMP(d.buf, !=, out->buf, out->len)) {
ok = 0;
printf("\nfail\n\tsteps = %d\n\tinput = ", n);
type_hex.dump(in, stdout);
p += i; sz -= i;
}
- if (memcmp(d.buf, want->buf, want->len) != 0) {
+ if (MEMCMP(d.buf, !=, want->buf, want->len)) {
ok = 0;
printf("\nfail (get):\n\tstep = %i\n\tinput = ", *ip);
type_hex.dump(m, stdout);
p += i; sz -= i;
}
- if (memcmp(d.buf, want->buf, want->len) != 0) {
+ if (MEMCMP(d.buf, !=, want->buf, want->len)) {
ok = 0;
printf("\nfail (mask):\n\tstep = %i\n\tinput = ", *ip);
type_hex.dump(m, stdout);
if (tsz) kmac_done(&ctx, d.buf, tsz);
else { kmac_xof(&ctx); kmac_get(&ctx, d.buf, d.len); }
- if (memcmp(d.buf, want->buf, want->len) != 0) {
+ if (MEMCMP(d.buf, !=, want->buf, want->len)) {
ok = 0;
printf("\nfail");
printf("\n\tperso = `%s'", perso->buf);