File indexing completed on 2025-01-18 10:12:40
0001 #ifndef crypto_stream_H
0002 #define crypto_stream_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <stddef.h>
0013
0014 #include "crypto_stream_xsalsa20.h"
0015 #include "export.h"
0016
0017 #ifdef __cplusplus
0018 # ifdef __GNUC__
0019 # pragma GCC diagnostic ignored "-Wlong-long"
0020 # endif
0021 extern "C" {
0022 #endif
0023
0024 #define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES
0025 SODIUM_EXPORT
0026 size_t crypto_stream_keybytes(void);
0027
0028 #define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
0029 SODIUM_EXPORT
0030 size_t crypto_stream_noncebytes(void);
0031
0032 #define crypto_stream_MESSAGEBYTES_MAX crypto_stream_xsalsa20_MESSAGEBYTES_MAX
0033 SODIUM_EXPORT
0034 size_t crypto_stream_messagebytes_max(void);
0035
0036 #define crypto_stream_PRIMITIVE "xsalsa20"
0037 SODIUM_EXPORT
0038 const char *crypto_stream_primitive(void);
0039
0040 SODIUM_EXPORT
0041 int crypto_stream(unsigned char *c, unsigned long long clen,
0042 const unsigned char *n, const unsigned char *k)
0043 __attribute__ ((nonnull));
0044
0045 SODIUM_EXPORT
0046 int crypto_stream_xor(unsigned char *c, const unsigned char *m,
0047 unsigned long long mlen, const unsigned char *n,
0048 const unsigned char *k)
0049 __attribute__ ((nonnull));
0050
0051 SODIUM_EXPORT
0052 void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES])
0053 __attribute__ ((nonnull));
0054
0055 #ifdef __cplusplus
0056 }
0057 #endif
0058
0059 #endif