diff --git a/src/libsodium/crypto_stream/crypto_stream.c b/src/libsodium/crypto_stream/crypto_stream.c index 8a5f5720..50a9c1c0 100644 --- a/src/libsodium/crypto_stream/crypto_stream.c +++ b/src/libsodium/crypto_stream/crypto_stream.c @@ -1,6 +1,24 @@ #include "crypto_stream.h" +size_t +crypto_stream_keybytes(void) +{ + return crypto_stream_KEYBYTES; +} + +size_t +crypto_stream_noncebytes(void) +{ + return crypto_stream_NONCEBYTES; +} + +const char * +crypto_stream_primitive(void) +{ + return crypto_stream_PRIMITIVE; +} + int crypto_stream(unsigned char *c, unsigned long long clen, const unsigned char *n, const unsigned char *k) diff --git a/src/libsodium/include/sodium/crypto_stream.h b/src/libsodium/include/sodium/crypto_stream.h index 8890122f..6c6d9ac9 100644 --- a/src/libsodium/include/sodium/crypto_stream.h +++ b/src/libsodium/include/sodium/crypto_stream.h @@ -1,16 +1,23 @@ #ifndef crypto_stream_H #define crypto_stream_H -#include "crypto_stream_xsalsa20.h" +#include -#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES -#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES -#define crypto_stream_PRIMITIVE "xsalsa20" +#include "crypto_stream_xsalsa20.h" #ifdef __cplusplus extern "C" { #endif +#define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES +size_t crypto_stream_keybytes(void); + +#define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES +size_t crypto_stream_noncebytes(void); + +#define crypto_stream_PRIMITIVE "xsalsa20" +const char *crypto_stream_primitive(void); + int crypto_stream(unsigned char *c, unsigned long long clen, const unsigned char *n, const unsigned char *k);