02d41a9e48e7a307c3756414b170983d127d0af9
[trex.git] /
1 #ifndef crypto_onetimeauth_H
2 #define crypto_onetimeauth_H
3
4 #include <stddef.h>
5
6 #include "crypto_onetimeauth_poly1305.h"
7 #include "export.h"
8
9 #ifdef __cplusplus
10 # if __GNUC__
11 #  pragma GCC diagnostic ignored "-Wlong-long"
12 # endif
13 extern "C" {
14 #endif
15
16 typedef crypto_onetimeauth_poly1305_state crypto_onetimeauth_state;
17
18 #define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES
19 SODIUM_EXPORT
20 size_t  crypto_onetimeauth_bytes(void);
21
22 #define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES
23 SODIUM_EXPORT
24 size_t  crypto_onetimeauth_keybytes(void);
25
26 #define crypto_onetimeauth_PRIMITIVE "poly1305"
27 SODIUM_EXPORT
28 const char *crypto_onetimeauth_primitive(void);
29
30 SODIUM_EXPORT
31 int crypto_onetimeauth(unsigned char *out, const unsigned char *in,
32                        unsigned long long inlen, const unsigned char *k);
33
34 SODIUM_EXPORT
35 int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
36                               unsigned long long inlen, const unsigned char *k);
37
38 SODIUM_EXPORT
39 int crypto_onetimeauth_init(crypto_onetimeauth_state *state,
40                             const unsigned char *key);
41
42 SODIUM_EXPORT
43 int crypto_onetimeauth_update(crypto_onetimeauth_state *state,
44                               const unsigned char *in,
45                               unsigned long long inlen);
46
47 SODIUM_EXPORT
48 int crypto_onetimeauth_final(crypto_onetimeauth_state *state,
49                              unsigned char *out);
50
51 #ifdef __cplusplus
52 }
53 #endif
54
55 #endif