libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_secretbox.h
blobeb14bc52b963af2cc1f24af36938fe7d71e6fa0c
1 #ifndef crypto_secretbox_H
2 #define crypto_secretbox_H
4 #include <stddef.h>
6 #include "crypto_secretbox_xsalsa20poly1305.h"
7 #include "export.h"
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 #define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES
14 SODIUM_EXPORT
15 size_t crypto_secretbox_keybytes(void);
17 #define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES
18 SODIUM_EXPORT
19 size_t crypto_secretbox_noncebytes(void);
21 #define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES
22 SODIUM_EXPORT
23 size_t crypto_secretbox_zerobytes(void);
25 #define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
26 SODIUM_EXPORT
27 size_t crypto_secretbox_boxzerobytes(void);
29 #define crypto_secretbox_PRIMITIVE "xsalsa20poly1305"
30 SODIUM_EXPORT
31 const char *crypto_secretbox_primitive(void);
33 SODIUM_EXPORT
34 int crypto_secretbox(unsigned char *c, const unsigned char *m,
35 unsigned long long mlen, const unsigned char *n,
36 const unsigned char *k);
38 SODIUM_EXPORT
39 int crypto_secretbox_open(unsigned char *m, const unsigned char *c,
40 unsigned long long clen, const unsigned char *n,
41 const unsigned char *k);
43 #ifdef __cplusplus
45 #endif
47 #endif