Warning, file /include/sodium/crypto_stream_xsalsa20.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef crypto_stream_xsalsa20_H
0002 #define crypto_stream_xsalsa20_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <stddef.h>
0013 #include <stdint.h>
0014 #include "export.h"
0015
0016 #ifdef __cplusplus
0017 # ifdef __GNUC__
0018 # pragma GCC diagnostic ignored "-Wlong-long"
0019 # endif
0020 extern "C" {
0021 #endif
0022
0023 #define crypto_stream_xsalsa20_KEYBYTES 32U
0024 SODIUM_EXPORT
0025 size_t crypto_stream_xsalsa20_keybytes(void);
0026
0027 #define crypto_stream_xsalsa20_NONCEBYTES 24U
0028 SODIUM_EXPORT
0029 size_t crypto_stream_xsalsa20_noncebytes(void);
0030
0031 #define crypto_stream_xsalsa20_MESSAGEBYTES_MAX SODIUM_SIZE_MAX
0032 SODIUM_EXPORT
0033 size_t crypto_stream_xsalsa20_messagebytes_max(void);
0034
0035 SODIUM_EXPORT
0036 int crypto_stream_xsalsa20(unsigned char *c, unsigned long long clen,
0037 const unsigned char *n, const unsigned char *k)
0038 __attribute__ ((nonnull));
0039
0040 SODIUM_EXPORT
0041 int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m,
0042 unsigned long long mlen, const unsigned char *n,
0043 const unsigned char *k)
0044 __attribute__ ((nonnull));
0045
0046 SODIUM_EXPORT
0047 int crypto_stream_xsalsa20_xor_ic(unsigned char *c, const unsigned char *m,
0048 unsigned long long mlen,
0049 const unsigned char *n, uint64_t ic,
0050 const unsigned char *k)
0051 __attribute__ ((nonnull));
0052
0053 SODIUM_EXPORT
0054 void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES])
0055 __attribute__ ((nonnull));
0056
0057 #ifdef __cplusplus
0058 }
0059 #endif
0060
0061 #endif