From 639a92ebe7d72b2ed679033a09d0ef201c5db309 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 23 Feb 2014 20:24:59 -0800 Subject: [PATCH] Add crypto_hash_primitive() --- src/libsodium/crypto_hash/crypto_hash.c | 5 +++++ src/libsodium/include/sodium/crypto_hash.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/libsodium/crypto_hash/crypto_hash.c b/src/libsodium/crypto_hash/crypto_hash.c index 2718b494..e05223d4 100644 --- a/src/libsodium/crypto_hash/crypto_hash.c +++ b/src/libsodium/crypto_hash/crypto_hash.c @@ -7,3 +7,8 @@ crypto_hash(unsigned char *out, const unsigned char *in, { return crypto_hash_sha512(out, in, inlen); } + +const char * +crypto_hash_primitive(void) { + return crypto_hash_sha512_primitive(); +} diff --git a/src/libsodium/include/sodium/crypto_hash.h b/src/libsodium/include/sodium/crypto_hash.h index b922d041..3aa732dd 100644 --- a/src/libsodium/include/sodium/crypto_hash.h +++ b/src/libsodium/include/sodium/crypto_hash.h @@ -19,6 +19,9 @@ SODIUM_EXPORT int crypto_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen); +SODIUM_EXPORT +const char *crypto_hash_primitive(void); + #ifdef __cplusplus } #endif