tolerate additional IPv4 address now available for gnunet.org
[oweals/gnunet.git] / src / util / crypto_hkdf.c
index c6c43f800c8ae8eb6934570b72757fbf0f56b18d..5ed22269f7cba98eaac6ae53fee8da17b16e0de7 100644 (file)
@@ -36,7 +36,7 @@
  * - Matthias Wachs (08.10.2010)
  */
 
-#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+#define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-hkdf", __VA_ARGS__)
 
 /**
  * Set this to 0 if you compile this code outside of GNUnet.
@@ -53,6 +53,7 @@
 #if GNUNET_BUILD
 #include "platform.h"
 #include "gnunet_crypto_lib.h"
+#include "benchmark.h"
 #else
 #define GNUNET_NO 0
 #define GNUNET_YES 1
@@ -155,6 +156,8 @@ GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo,
   size_t ctx_len;
   va_list args;
 
+  BENCHMARK_START (hkdf);
+
   if (0 == k)
     return GNUNET_SYSERR;
   if (GPG_ERR_NO_ERROR !=
@@ -265,6 +268,7 @@ hkdf_error:
 hkdf_ok:
   gcry_md_close (xtr);
   gcry_md_close (prf);
+  BENCHMARK_END (hkdf);
   return ret;
 }