libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_stream_salsa2012.h
blob742a7a1a52cbab3a110912ac87241caca5248d1d
1 #ifndef crypto_stream_salsa2012_H
2 #define crypto_stream_salsa2012_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>
13 #include "export.h"
15 #define crypto_stream_salsa2012_KEYBYTES 32U
16 #define crypto_stream_salsa2012_NONCEBYTES 8U
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
22 SODIUM_EXPORT
23 size_t crypto_stream_salsa2012_keybytes(void);
25 SODIUM_EXPORT
26 size_t crypto_stream_salsa2012_noncebytes(void);
28 SODIUM_EXPORT
29 const char * crypto_stream_salsa2012_primitive(void);
31 SODIUM_EXPORT
32 int crypto_stream_salsa2012(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
34 SODIUM_EXPORT
35 int crypto_stream_salsa2012_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
37 #ifdef __cplusplus
39 #endif
41 #define crypto_stream_salsa2012_ref crypto_stream_salsa2012
42 #define crypto_stream_salsa2012_ref_xor crypto_stream_salsa2012_xor
44 #endif