diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-05-03 12:24:53 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-05-03 12:24:53 +0200 |
commit | 9b1065bcad0e82350e3e72e474ae425293defe42 (patch) | |
tree | 662a612de10cbc4b195b0161680f3a2cf3198d7d /src/gnsrecord | |
parent | ae3ce5eaf5df138e41337c7cf4d964a031b3008d (diff) | |
download | gnunet-9b1065bcad0e82350e3e72e474ae425293defe42.tar.gz gnunet-9b1065bcad0e82350e3e72e474ae425293defe42.zip |
-remove (hopefully) unnecessary clamping
Diffstat (limited to 'src/gnsrecord')
-rw-r--r-- | src/gnsrecord/test_gnsrecord_crypto.c | 14 |
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 | ||