diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 944fe16d..44a2a37d 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -51,6 +51,7 @@ libsodium_la_SOURCES = \ crypto_secretbox/crypto_secretbox.c \ crypto_secretbox/xsalsa20poly1305/ref/api.h \ crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c \ + crypto_shorthash/crypto_shorthash.c \ crypto_shorthash/siphash24/ref/api.h \ crypto_shorthash/siphash24/ref/shorthash_siphash24.c \ crypto_sign/ed25519/ref10/base.h \ diff --git a/src/libsodium/crypto_shorthash/crypto_shorthash.c b/src/libsodium/crypto_shorthash/crypto_shorthash.c new file mode 100644 index 00000000..37274f08 --- /dev/null +++ b/src/libsodium/crypto_shorthash/crypto_shorthash.c @@ -0,0 +1,9 @@ + +#include "crypto_shorthash.h" + +int +crypto_shorthash(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k) +{ + return crypto_shorthash_siphash24(out, in, inlen, k); +} diff --git a/src/libsodium/include/sodium/crypto_shorthash.h b/src/libsodium/include/sodium/crypto_shorthash.h index 925b4a63..d733b0c7 100644 --- a/src/libsodium/include/sodium/crypto_shorthash.h +++ b/src/libsodium/include/sodium/crypto_shorthash.h @@ -3,9 +3,11 @@ #include "crypto_shorthash_siphash24.h" -#define crypto_shorthash crypto_shorthash_siphash24 #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES #define crypto_shorthash_PRIMITIVE "siphash24" +int crypto_shorthash(unsigned char *out, const unsigned char *in, + unsigned long long inlen, const unsigned char *k); + #endif