ct/lc_ct_cmp: improve interface
Return 0xffffffff if arguments compare equal, 0 otherwise. Change all consumers accordingly.
This commit is contained in:
parent
ad42d99e0b
commit
52ab9ca179
5 changed files with 12 additions and 9 deletions
|
@ -162,7 +162,7 @@ chacha20_poly1305_open(const uint8_t *key, size_t keylen, const uint8_t *iv,
|
|||
!poly1305_final(&pctx, tag, &olen))
|
||||
return 0;
|
||||
|
||||
if (lc_ct_cmp(tag, tagp, LC_POLY1305_TAGLEN) != 0)
|
||||
if (!lc_ct_cmp(tag, tagp, LC_POLY1305_TAGLEN))
|
||||
return 0;
|
||||
|
||||
lc_scrub(buf, sizeof(buf));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue