X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/6af2607b63ce649a919513949d5f8a8deb2e6663..141c12847a1c2f8cc8db03d420551584e689fb87:/symm/poly1305.c diff --git a/symm/poly1305.c b/symm/poly1305.c index c4a88a84..da4594fa 100644 --- a/symm/poly1305.c +++ b/symm/poly1305.c @@ -861,6 +861,7 @@ void poly1305_done(poly1305_ctx *ctx, void *h) #ifdef TEST_RIG +#include #include #include "ct.h" @@ -888,7 +889,7 @@ static int vrf_hash(dstr v[]) poly1305_hash(&ctx, v[2].buf + j, v[2].len - j); poly1305_done(&ctx, t.buf); ct_remedy(t.buf, t.len); - if (memcmp(t.buf, v[3].buf, 16) != 0) { + if (MEMCMP(t.buf, !=, v[3].buf, 16)) { fprintf(stderr, "failed..."); fprintf(stderr, "\n\tkey = "); type_hex.dump(&v[0], stderr); fprintf(stderr, "\n\tmask = "); type_hex.dump(&v[1], stderr); @@ -932,7 +933,7 @@ static int vrf_cat(dstr v[]) poly1305_concat(&ctx, &ctx, &cc[2]); } poly1305_done(&ctx, t.buf); - if (memcmp(t.buf, v[5].buf, 16) != 0) { + if (MEMCMP(t.buf, !=, v[5].buf, 16)) { fprintf(stderr, "failed..."); fprintf(stderr, "\n\tkey = "); type_hex.dump(&v[0], stderr); fprintf(stderr, "\n\tmask = "); type_hex.dump(&v[1], stderr); @@ -997,7 +998,7 @@ static int vrf_mct(dstr v[]) } } - if (memcmp(t, v[4].buf, 16) != 0) { + if (MEMCMP(t, !=, v[4].buf, 16)) { ok = 0; fprintf(stderr, "failed..."); fprintf(stderr, "\n\tinitial k = "); type_hex.dump(&v[0], stderr);