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/hmacsha256/cp/verify_hmacsha256.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libsodium/crypto_auth/hmacsha256') diff --git a/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c b/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c index b6cf489..be9d34f 100644 --- a/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +++ b/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c @@ -1,9 +1,11 @@ #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); + return crypto_verify_32(h,correct) | (-(h - correct == 0)) | + sodium_memcmp(correct,h,32); } -- cgit v1.2.3