X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/e5b61a8dec3586f96d25bd3ef454176526ff0f69..141c12847a1c2f8cc8db03d420551584e689fb87:/symm/rc2.c diff --git a/symm/rc2.c b/symm/rc2.c index df594251..97963fef 100644 --- a/symm/rc2.c +++ b/symm/rc2.c @@ -250,6 +250,7 @@ void rc2_dblk(const rc2_ctx *k, const uint32 *s, uint32 *dst) #ifdef TEST_RIG +#include #include #include @@ -276,7 +277,7 @@ static int verify(dstr *v) BLKC_MOVE(RC2, d, p); rc2_eblk(&k, d, d); BLKC_STORE(RC2, b.buf, d); - if (memcmp(b.buf, v[3].buf, RC2_BLKSZ)) { + if (MEMCMP(b.buf, !=, v[3].buf, RC2_BLKSZ)) { ok = 0; printf("\nfail encryption:" "\n\tkey = "); @@ -293,7 +294,7 @@ static int verify(dstr *v) BLKC_MOVE(RC2, d, c); rc2_dblk(&k, d, d); BLKC_STORE(RC2, b.buf, d); - if (memcmp(b.buf, v[2].buf, RC2_BLKSZ)) { + if (MEMCMP(b.buf, !=, v[2].buf, RC2_BLKSZ)) { ok = 0; printf("\nfail decryption:" "\n\tkey = ");