mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 19:57:13 +09:00
Import poly1305_53
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
#define CRYPTO_BYTES 16
|
||||
#define CRYPTO_KEYBYTES 32
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
#ifndef crypto_onetimeauth_H
|
||||
#define crypto_onetimeauth_H
|
||||
|
||||
#include "crypto_onetimeauth_poly1305.h"
|
||||
|
||||
#define crypto_onetimeauth crypto_onetimeauth_poly1305
|
||||
#define crypto_onetimeauth_verify crypto_onetimeauth_poly1305_verify
|
||||
#define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES
|
||||
#define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES
|
||||
#define crypto_onetimeauth_PRIMITIVE "poly1305"
|
||||
#define crypto_onetimeauth_IMPLEMENTATION crypto_onetimeauth_poly1305_IMPLEMENTATION
|
||||
#define crypto_onetimeauth_VERSION crypto_onetimeauth_poly1305_VERSION
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user