libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_stream_salsa20.h.in
blob9f8e9df2e5aef1ea5c73ff39330b85f65d793e7c
1 #ifndef crypto_stream_salsa20_H
2 #define crypto_stream_salsa20_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 #if @HAVE_AMD64_ASM_V@
13 # ifndef SODIUM_HAVE_AMD64_ASM
14 # define SODIUM_HAVE_AMD64_ASM
15 # endif
16 #endif
18 #include "export.h"
20 #define crypto_stream_salsa20_KEYBYTES 32U
21 #define crypto_stream_salsa20_NONCEBYTES 8U
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 SODIUM_EXPORT
28 int crypto_stream_salsa20(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
30 SODIUM_EXPORT
31 int crypto_stream_salsa20_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
33 #ifdef SODIUM_HAVE_AMD64_ASM
34 # define crypto_stream_salsa20_amd64_xmm6 crypto_stream_salsa20
35 # define crypto_stream_salsa20_amd64_xmm6_xor crypto_stream_salsa20_xor
36 #else
37 # define crypto_stream_salsa20_ref crypto_stream_salsa20
38 # define crypto_stream_salsa20_ref_xor crypto_stream_salsa20_xor
39 #endif
41 #ifdef __cplusplus
43 #endif
45 #endif