libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_stream.h
blobbe9c3ee00e61a63acffd2bf58e9f3ffd10327536
1 #ifndef crypto_stream_H
2 #define crypto_stream_H
4 /*
5 * WARNING: This is just a stream cipher. It is NOT authenticated encryption.
6 * While it provides some protection against eavesdropping, it does NOT
7 * provide any security against active attacks.
8 * Unless you know what you're doing, what you are looking for is probably
9 * the crypto_box functions.
12 #include <stddef.h>
14 #include "crypto_stream_xsalsa20.h"
15 #include "export.h"
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 #define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES
22 size_t crypto_stream_keybytes(void);
24 #define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
25 size_t crypto_stream_noncebytes(void);
27 #define crypto_stream_PRIMITIVE "xsalsa20"
28 const char *crypto_stream_primitive(void);
30 SODIUM_EXPORT
31 int crypto_stream(unsigned char *c, unsigned long long clen,
32 const unsigned char *n, const unsigned char *k);
34 SODIUM_EXPORT
35 int crypto_stream_xor(unsigned char *c, const unsigned char *m,
36 unsigned long long mlen, const unsigned char *n,
37 const unsigned char *k);
39 #ifdef __cplusplus
41 #endif
43 #endif