-code deduplication in rsa sign/verify code
[oweals/gnunet.git] / src / util / test_crypto_ksk.c
index f0e4337ef6fb5d34c752f41d8c0de3d07a6e7950..f062e31f500fadd1c3fbe7c48d8678e7b7f06fff 100644 (file)
@@ -25,9 +25,9 @@
  */
 #include "platform.h"
 #include "gnunet_common.h"
-#include "gnunet_crypto_lib.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_signatures.h"
-#include "gnunet_time_lib.h"
+
 
 #define TESTSTRING "Hello World\0"
 #define MAX_TESTVAL 20
@@ -167,9 +167,10 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
       continue;
     }
   }
-  printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER,
-          (unsigned long long)
-          GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
+  printf ("%d RSA encrypt/decrypt operations %s (%d failures)\n", 
+         ITER,
+         GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES), 
+         ok);
   if (ok == 0)
     return GNUNET_OK;
   else
@@ -217,9 +218,9 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
       continue;
     }
   }
-  printf ("%d RSA sign/verify operations %llums\n", ITER,
-          (unsigned long long)
-          GNUNET_TIME_absolute_get_duration (start).rel_value);
+  printf ("%d RSA sign/verify operations %s\n", 
+         ITER,
+         GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration (start), GNUNET_YES));
   return ok;
 }