libsodium (1.0.19)
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 __attribute__ ((nonnull(1, 4)));
32
33 SODIUM_EXPORT
34 int crypto_auth_verify(const unsigned char *h, const unsigned char *in,
35 unsigned long long inlen, const unsigned char *k)
36 __attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
37
38 SODIUM_EXPORT
39 void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES])
40 __attribute__ ((nonnull));
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif