/*----- Header files ------------------------------------------------------*/
+#include <mLib/macros.h>
+
#include "latinpoly-def.h"
/*----- Main code ---------------------------------------------------------*/
if (rc) { printf("!! encryptdone reports failure\n"); goto encfail; }
out.len = BLEN(&b); tag.len = POLY1305_TAGSZ;
- if (out.len != v[4].len || memcmp(out.buf, v[4].buf, v[4].len) ||
- memcmp(tag.buf, v[5].buf, v[5].len)) {
+ if (out.len != v[4].len ||
+ MEMCMP(out.buf, !=, v[4].buf, v[4].len) ||
+ MEMCMP(tag.buf, !=, v[5].buf, v[5].len)) {
encfail:
ok = 0;
printf("\n%s encrypt FAILED", aec->name);
if (rc < 0) { printf("!! decryptdone reports failure\n"); goto decfail; }
out.len = BLEN(&b); tag.len = POLY1305_TAGSZ;
- if (out.len != v[3].len || memcmp(out.buf, v[3].buf, v[3].len) || !rc) {
+ if (out.len != v[3].len || MEMCMP(out.buf, !=, v[3].buf, v[3].len) ||
+ !rc) {
decfail:
ok = 0;
printf("\ndecrypt FAILED");