diff --git a/src/libsodium/crypto_shorthash/crypto_shorthash.c b/src/libsodium/crypto_shorthash/crypto_shorthash.c index 37274f08..b68b58a4 100644 --- a/src/libsodium/crypto_shorthash/crypto_shorthash.c +++ b/src/libsodium/crypto_shorthash/crypto_shorthash.c @@ -1,6 +1,24 @@ #include "crypto_shorthash.h" +size_t +crypto_shorthash_bytes(void) +{ + return crypto_shorthash_BYTES; +} + +size_t +crypto_shorthash_keybytes(void) +{ + return crypto_shorthash_KEYBYTES; +} + +const char * +crypto_shorthash_primitive(void) +{ + return crypto_shorthash_PRIMITIVE; +} + int crypto_shorthash(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k) diff --git a/src/libsodium/include/sodium/crypto_shorthash.h b/src/libsodium/include/sodium/crypto_shorthash.h index 0669c888..9e8d900b 100644 --- a/src/libsodium/include/sodium/crypto_shorthash.h +++ b/src/libsodium/include/sodium/crypto_shorthash.h @@ -1,16 +1,23 @@ #ifndef crypto_shorthash_H #define crypto_shorthash_H -#include "crypto_shorthash_siphash24.h" +#include -#define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES -#define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES -#define crypto_shorthash_PRIMITIVE "siphash24" +#include "crypto_shorthash_siphash24.h" #ifdef __cplusplus extern "C" { #endif +#define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES +size_t crypto_shorthash_bytes(void); + +#define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES +size_t crypto_shorthash_keybytes(void); + +#define crypto_shorthash_PRIMITIVE "siphash24" +const char *crypto_shorthash_primitive(void); + int crypto_shorthash(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k);