~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base/asm-common.h (x86), and knock-on: Add macros for full-size regs.
[catacomb]
/
symm
/
latinpoly-test.c
diff --git
a/symm/latinpoly-test.c
b/symm/latinpoly-test.c
index
5a914e5
..
f7a2076
100644
(file)
--- a/
symm/latinpoly-test.c
+++ b/
symm/latinpoly-test.c
@@
-27,6
+27,8
@@
/*----- Header files ------------------------------------------------------*/
/*----- Header files ------------------------------------------------------*/
+#include <mLib/macros.h>
+
#include "latinpoly-def.h"
/*----- Main code ---------------------------------------------------------*/
#include "latinpoly-def.h"
/*----- Main code ---------------------------------------------------------*/
@@
-62,8
+64,9
@@
int latinpoly_test(const gcaead *aec, dstr *v)
if (rc) { printf("!! encryptdone reports failure\n"); goto encfail; }
out.len = BLEN(&b); tag.len = POLY1305_TAGSZ;
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);
encfail:
ok = 0;
printf("\n%s encrypt FAILED", aec->name);
@@
-91,7
+94,8
@@
int latinpoly_test(const gcaead *aec, dstr *v)
if (rc < 0) { printf("!! decryptdone reports failure\n"); goto decfail; }
out.len = BLEN(&b); tag.len = POLY1305_TAGSZ;
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");
decfail:
ok = 0;
printf("\ndecrypt FAILED");