libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_onetimeauth_poly1305.h
blob19d55f1811e3e2a16e34ed771f40c07adaf99c6d
1 #ifndef crypto_onetimeauth_poly1305_H
2 #define crypto_onetimeauth_poly1305_H
4 #include <stddef.h>
5 #include "export.h"
7 #define crypto_onetimeauth_poly1305_BYTES 16U
8 #define crypto_onetimeauth_poly1305_KEYBYTES 32U
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 #include <sys/types.h>
15 #include <stdint.h>
16 #include <stdio.h>
18 typedef struct crypto_onetimeauth_poly1305_implementation {
19 const char *(*implementation_name)(void);
20 int (*onetimeauth)(unsigned char *out,
21 const unsigned char *in,
22 unsigned long long inlen,
23 const unsigned char *k);
24 int (*onetimeauth_verify)(const unsigned char *h,
25 const unsigned char *in,
26 unsigned long long inlen,
27 const unsigned char *k);
28 } crypto_onetimeauth_poly1305_implementation;
30 SODIUM_EXPORT
31 size_t crypto_onetimeauth_poly1305_bytes(void);
33 SODIUM_EXPORT
34 size_t crypto_onetimeauth_poly1305_keybytes(void);
36 SODIUM_EXPORT
37 const char * crypto_onetimeauth_poly1305_primitive(void);
39 SODIUM_EXPORT
40 const char *crypto_onetimeauth_poly1305_ref_implementation_name(void);
42 SODIUM_EXPORT
43 int crypto_onetimeauth_poly1305_set_implementation(crypto_onetimeauth_poly1305_implementation *impl);
45 SODIUM_EXPORT
46 crypto_onetimeauth_poly1305_implementation *
47 crypto_onetimeauth_pick_best_implementation(void);
49 SODIUM_EXPORT
50 int crypto_onetimeauth_poly1305(unsigned char *out,
51 const unsigned char *in,
52 unsigned long long inlen,
53 const unsigned char *k);
55 SODIUM_EXPORT
56 int crypto_onetimeauth_poly1305_verify(const unsigned char *h,
57 const unsigned char *in,
58 unsigned long long inlen,
59 const unsigned char *k);
61 #ifdef __cplusplus
63 #endif
65 #endif