aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnsrecord')
-rw-r--r--src/gnsrecord/test_gnsrecord_crypto.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gnsrecord/test_gnsrecord_crypto.c b/src/gnsrecord/test_gnsrecord_crypto.c
index 9394f562d..b9b2b5ba5 100644
--- a/src/gnsrecord/test_gnsrecord_crypto.c
+++ b/src/gnsrecord/test_gnsrecord_crypto.c
@@ -148,15 +148,29 @@ run (void *cls,
148{ 148{
149 struct GNUNET_IDENTITY_PrivateKey privkey; 149 struct GNUNET_IDENTITY_PrivateKey privkey;
150 struct GNUNET_IDENTITY_PrivateKey privkey_ed; 150 struct GNUNET_IDENTITY_PrivateKey privkey_ed;
151 struct GNUNET_TIME_Absolute start;
152 struct GNUNET_TIME_Absolute end;
151 153
152 154
153 privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY); 155 privkey.type = htonl (GNUNET_GNSRECORD_TYPE_PKEY);
154 GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key); 156 GNUNET_CRYPTO_ecdsa_key_create (&privkey.ecdsa_key);
157 start = GNUNET_TIME_absolute_get ();
155 test_with_type (&privkey); 158 test_with_type (&privkey);
159 end = GNUNET_TIME_absolute_get ();
160 printf ("Time: %llu ms\n", (unsigned long long)
161 GNUNET_TIME_absolute_get_difference (start,
162 end).rel_value_us);
156 163
157 privkey_ed.type = htonl (GNUNET_GNSRECORD_TYPE_EDKEY); 164 privkey_ed.type = htonl (GNUNET_GNSRECORD_TYPE_EDKEY);
158 GNUNET_CRYPTO_eddsa_key_create (&privkey_ed.eddsa_key); 165 GNUNET_CRYPTO_eddsa_key_create (&privkey_ed.eddsa_key);
166 start = GNUNET_TIME_absolute_get ();
159 test_with_type(&privkey_ed); 167 test_with_type(&privkey_ed);
168 end = GNUNET_TIME_absolute_get ();
169 printf ("Time: %llu ms\n", (unsigned long long)
170 GNUNET_TIME_absolute_get_difference (start,
171 end).rel_value_us);
172
173
160} 174}
161 175
162 176