From c73b6c9ba513fea3e18b696e659049df69931171 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 11 Nov 2014 11:18:18 -0500 Subject: update to 1.0.0-1 version of the package --- src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsodium/crypto_auth/hmacsha512') diff --git a/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c b/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c index fccdc1a..28e0dfb 100644 --- a/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +++ b/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c @@ -1,10 +1,12 @@ #include "api.h" #include "crypto_verify_64.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[64]; crypto_auth(correct,in,inlen,k); - return crypto_verify_64(h,correct); + return crypto_verify_64(h,correct) | (-(h - correct == 0)) | + sodium_memcmp(correct,h,64); } -- cgit v1.2.3