xref: /freebsd/sys/contrib/libsodium/src/libsodium/include/sodium/crypto_auth.h (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1 #ifndef crypto_auth_H
2 #define crypto_auth_H
3 
4 #include <stddef.h>
5 
6 #include "crypto_auth_hmacsha512256.h"
7 #include "export.h"
8 
9 #ifdef __cplusplus
10 # ifdef __GNUC__
11 #  pragma GCC diagnostic ignored "-Wlong-long"
12 # endif
13 extern "C" {
14 #endif
15 
16 #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES
17 SODIUM_EXPORT
18 size_t  crypto_auth_bytes(void);
19 
20 #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES
21 SODIUM_EXPORT
22 size_t  crypto_auth_keybytes(void);
23 
24 #define crypto_auth_PRIMITIVE "hmacsha512256"
25 SODIUM_EXPORT
26 const char *crypto_auth_primitive(void);
27 
28 SODIUM_EXPORT
29 int crypto_auth(unsigned char *out, const unsigned char *in,
30                 unsigned long long inlen, const unsigned char *k);
31 
32 SODIUM_EXPORT
33 int crypto_auth_verify(const unsigned char *h, const unsigned char *in,
34                        unsigned long long inlen, const unsigned char *k)
35             __attribute__ ((warn_unused_result));
36 
37 SODIUM_EXPORT
38 void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES]);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif
45