libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / crypto_secretbox / crypto_secretbox.c
blob06801ee1a9766533492884398871c1f810c4050c
2 #include "crypto_secretbox.h"
4 size_t
5 crypto_secretbox_keybytes(void)
7 return crypto_secretbox_KEYBYTES;
10 size_t
11 crypto_secretbox_noncebytes(void)
13 return crypto_secretbox_NONCEBYTES;
16 size_t
17 crypto_secretbox_zerobytes(void)
19 return crypto_secretbox_ZEROBYTES;
22 size_t
23 crypto_secretbox_boxzerobytes(void)
25 return crypto_secretbox_BOXZEROBYTES;
28 const char *
29 crypto_secretbox_primitive(void)
31 return crypto_secretbox_PRIMITIVE;
34 int
35 crypto_secretbox(unsigned char *c, const unsigned char *m,
36 unsigned long long mlen, const unsigned char *n,
37 const unsigned char *k)
39 return crypto_secretbox_xsalsa20poly1305(c, m, mlen, n, k);
42 int
43 crypto_secretbox_open(unsigned char *m, const unsigned char *c,
44 unsigned long long clen, const unsigned char *n,
45 const unsigned char *k)
47 return crypto_secretbox_xsalsa20poly1305_open(m, c, clen, n, k);