1 /*******************************************************************************
2 
3     D language bindings for libsodium's crypto_onetimeauth_poly1305.h
4 
5     License: ISC (see LICENSE.txt)
6 
7 *******************************************************************************/
8 
9 module libsodium.crypto_onetimeauth_poly1305;
10 
11 @nogc nothrow:
12 
13 import libsodium.export_;
14 
15 extern (C):
16 
17 align(16) struct crypto_onetimeauth_poly1305_state
18 {
19     ubyte[256] opaque;
20 }
21 
22 size_t crypto_onetimeauth_poly1305_statebytes ();
23 
24 enum crypto_onetimeauth_poly1305_BYTES = 16U;
25 size_t crypto_onetimeauth_poly1305_bytes ();
26 
27 enum crypto_onetimeauth_poly1305_KEYBYTES = 32U;
28 size_t crypto_onetimeauth_poly1305_keybytes ();
29 
30 int crypto_onetimeauth_poly1305 (
31     ubyte* out_,
32     const(ubyte)* in_,
33     ulong inlen,
34     const(ubyte)* k);
35 
36 int crypto_onetimeauth_poly1305_verify (
37     const(ubyte)* h,
38     const(ubyte)* in_,
39     ulong inlen,
40     const(ubyte)* k);
41 
42 int crypto_onetimeauth_poly1305_init (
43     crypto_onetimeauth_poly1305_state* state,
44     const(ubyte)* key);
45 
46 int crypto_onetimeauth_poly1305_update (
47     crypto_onetimeauth_poly1305_state* state,
48     const(ubyte)* in_,
49     ulong inlen);
50 
51 int crypto_onetimeauth_poly1305_final (
52     crypto_onetimeauth_poly1305_state* state,
53     ubyte* out_);
54 
55 void crypto_onetimeauth_poly1305_keygen (
56     ref ubyte[crypto_onetimeauth_poly1305_KEYBYTES] k);