serval-dna/nacl/nacl-20110221/crypto_onetimeauth/poly1305/ref/verify.c

10 lines
302 B
C
Raw Normal View History

#include "crypto_verify_16.h"
#include "crypto_onetimeauth.h"
int crypto_onetimeauth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
{
unsigned char correct[16];
crypto_onetimeauth(correct,in,inlen,k);
return crypto_verify_16(h,correct);
}