1 #ifndef crypto_stream_xsalsa20_H
2 #define crypto_stream_xsalsa20_H
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.
17 # pragma GCC diagnostic ignored "-Wlong-long"
22 #define crypto_stream_xsalsa20_KEYBYTES 32U
24 size_t crypto_stream_xsalsa20_keybytes(void);
26 #define crypto_stream_xsalsa20_NONCEBYTES 24U
28 size_t crypto_stream_xsalsa20_noncebytes(void);
31 int crypto_stream_xsalsa20(unsigned char *c, unsigned long long clen,
32 const unsigned char *n, const unsigned char *k);
35 int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m,
36 unsigned long long mlen, const unsigned char *n,
37 const unsigned char *k);