mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-31 06:07:13 +09:00
No binary changes on supported platforms except on gcc/armv7l where the control flow remains identical but permutative statements get switched.
13 lines
377 B
C
13 lines
377 B
C
#include "api.h"
|
|
#include "crypto_verify_32.h"
|
|
#include "utils.h"
|
|
|
|
int crypto_auth_verify(const unsigned char *h, const unsigned char *in,
|
|
unsigned long long inlen, const unsigned char *k)
|
|
{
|
|
unsigned char correct[32];
|
|
crypto_auth(correct,in,inlen,k);
|
|
return crypto_verify_32(h,correct) | (-(h == correct)) |
|
|
sodium_memcmp(correct,h,32);
|
|
}
|