2af0fdac8c674f1970eb46d35685538e36f6acf3
[trex.git] /
1
2 #include "crypto_onetimeauth.h"
3
4 size_t
5 crypto_onetimeauth_bytes(void)
6 {
7     return crypto_onetimeauth_BYTES;
8 }
9
10 size_t
11 crypto_onetimeauth_keybytes(void)
12 {
13     return crypto_onetimeauth_KEYBYTES;
14 }
15
16 const char *
17 crypto_onetimeauth_primitive(void)
18 {
19     return crypto_onetimeauth_PRIMITIVE;
20 }
21
22 int
23 crypto_onetimeauth(unsigned char *out, const unsigned char *in,
24                    unsigned long long inlen, const unsigned char *k)
25 {
26     return crypto_onetimeauth_poly1305(out, in, inlen, k);
27 }
28
29 int
30 crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
31                           unsigned long long inlen, const unsigned char *k)
32 {
33     return crypto_onetimeauth_poly1305_verify(h, in, inlen, k);
34 }
35
36 int
37 crypto_onetimeauth_init(crypto_onetimeauth_state *state,
38                         const unsigned char *key)
39 {
40     return crypto_onetimeauth_poly1305_init
41         ((crypto_onetimeauth_poly1305_state *) state, key);
42 }
43
44 int
45 crypto_onetimeauth_update(crypto_onetimeauth_state *state,
46                           const unsigned char *in,
47                           unsigned long long inlen)
48 {
49     return crypto_onetimeauth_poly1305_update
50         ((crypto_onetimeauth_poly1305_state *) state, in, inlen);
51 }
52
53 int
54 crypto_onetimeauth_final(crypto_onetimeauth_state *state,
55                          unsigned char *out)
56 {
57     return crypto_onetimeauth_poly1305_final
58         ((crypto_onetimeauth_poly1305_state *) state, out);
59 }