summaryrefslogtreecommitdiff
path: root/nacl/crypto_auth/hmacsha256/ref/verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/crypto_auth/hmacsha256/ref/verify.c')
-rw-r--r--nacl/crypto_auth/hmacsha256/ref/verify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/nacl/crypto_auth/hmacsha256/ref/verify.c b/nacl/crypto_auth/hmacsha256/ref/verify.c
new file mode 100644
index 00000000..96ff0ea8
--- /dev/null
+++ b/nacl/crypto_auth/hmacsha256/ref/verify.c
@@ -0,0 +1,9 @@
1#include "crypto_verify_32.h"
2#include "crypto_auth.h"
3
4int crypto_auth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
5{
6 unsigned char correct[32];
7 crypto_auth(correct,in,inlen,k);
8 return crypto_verify_32(h,correct);
9}