libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_generichash.h
blob52a16a8c59033f23645afec256dcc5de3b37dd9b
1 #ifndef crypto_generichash_H
2 #define crypto_generichash_H
4 #include <stddef.h>
6 #include "crypto_generichash_blake2b.h"
7 #include "export.h"
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 #define crypto_generichash_BYTES crypto_generichash_blake2b_BYTES
14 SODIUM_EXPORT
15 size_t crypto_generichash_bytes(void);
17 #define crypto_generichash_BYTES_MIN crypto_generichash_blake2b_BYTES_MIN
18 SODIUM_EXPORT
19 size_t crypto_generichash_bytes_min(void);
21 #define crypto_generichash_BYTES_MAX crypto_generichash_blake2b_BYTES_MAX
22 SODIUM_EXPORT
23 size_t crypto_generichash_bytes_max(void);
25 #define crypto_generichash_KEYBYTES crypto_generichash_blake2b_KEYBYTES
26 SODIUM_EXPORT
27 size_t crypto_generichash_keybytes(void);
29 #define crypto_generichash_KEYBYTES_MIN crypto_generichash_blake2b_KEYBYTES_MIN
30 SODIUM_EXPORT
31 size_t crypto_generichash_keybytes_min(void);
33 #define crypto_generichash_KEYBYTES_MAX crypto_generichash_blake2b_KEYBYTES_MAX
34 SODIUM_EXPORT
35 size_t crypto_generichash_keybytes_max(void);
37 #define crypto_generichash_BLOCKBYTES crypto_generichash_blake2b_BLOCKBYTES
38 SODIUM_EXPORT
39 size_t crypto_generichash_blockbytes(void);
41 #define crypto_generichash_PRIMITIVE "blake2b"
42 SODIUM_EXPORT
43 const char *crypto_generichash_primitive(void);
45 typedef crypto_generichash_blake2b_state crypto_generichash_state;
47 SODIUM_EXPORT
48 int crypto_generichash(unsigned char *out, size_t outlen,
49 const unsigned char *in, unsigned long long inlen,
50 const unsigned char *key, size_t keylen);
52 SODIUM_EXPORT
53 int crypto_generichash_init(crypto_generichash_state *state,
54 const unsigned char *key,
55 const size_t keylen, const size_t outlen);
57 SODIUM_EXPORT
58 int crypto_generichash_update(crypto_generichash_state *state,
59 const unsigned char *in,
60 unsigned long long inlen);
62 SODIUM_EXPORT
63 int crypto_generichash_final(crypto_generichash_state *state,
64 unsigned char *out, const size_t outlen);
66 #ifdef __cplusplus
68 #endif
70 #endif