From ea544ab2cae7f4f969a705d33d10da1a004cbd70 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Nov 2019 22:43:08 +0100 Subject: create crypto_pow, in preparation for #3795 --- src/include/gnunet_crypto_lib.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/include/gnunet_crypto_lib.h') diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 507705e50..4a42c5c74 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h @@ -654,6 +654,19 @@ GNUNET_CRYPTO_hash (const void *block, struct GNUNET_HashCode *ret); +/** + * Calculate the 'proof-of-work' hash (an expensive hash). + * + * @param buf data to hash + * @param buf_len number of bytes in @a buf + * @param result where to write the resulting hash + */ +void +GNUNET_CRYPTO_pow_hash (const void *buf, + size_t buf_len, + struct GNUNET_HashCode *result); + + /** * Context for cummulative hashing. */ -- cgit v1.2.3