From ea348bd6a8a26bf12e5bb1b749cc444a0f541ebf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 28 Sep 2005 15:53:55 +0200
Subject: [PATCH] * examples/nettle-benchmark.c (main): Benchmark openssl md5
 and sha1.

Rev: src/nettle/examples/nettle-benchmark.c:1.13
---
 examples/nettle-benchmark.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/examples/nettle-benchmark.c b/examples/nettle-benchmark.c
index 4a9a7163..9b386757 100644
--- a/examples/nettle-benchmark.c
+++ b/examples/nettle-benchmark.c
@@ -162,11 +162,11 @@ init_key(unsigned length,
 
 static void
 display(const char *name, const char *mode,
-	double speed)
+	double time)
 {
-  printf("%13s (%s): %.3fMB/s\n",
+  printf("%18s (%s): %.3f MB/s\n",
 	 name, mode,
-	 1 / (speed * 1048576.0 / BENCH_BLOCK));
+	 BENCH_BLOCK / (time * 1048576.0));
 }
 
 static void *
@@ -295,7 +295,9 @@ main(int argc UNUSED, char **argv UNUSED)
   const struct nettle_hash *hashes[] =
     {
       &nettle_md2, &nettle_md4, &nettle_md5,
+      OPENSSL(&nettle_openssl_md5)
       &nettle_sha1, &nettle_sha256,
+      OPENSSL(&nettle_openssl_sha1)
       NULL
     };
 
-- 
GitLab