aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_crypto_random.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-01-28 22:28:01 +0100
committerChristian Grothoff <christian@grothoff.org>2021-01-28 22:28:01 +0100
commita2169368bbd92b77636e39b5cfe864a1236b083b (patch)
tree65da98ffc353e87a75e7e65877f3a04c897b18b4 /src/util/test_crypto_random.c
parent2741db1300fddb17e39373fb9d649b7022ed81d3 (diff)
downloadgnunet-a2169368bbd92b77636e39b5cfe864a1236b083b.tar.gz
gnunet-a2169368bbd92b77636e39b5cfe864a1236b083b.zip
implement #6716
Diffstat (limited to 'src/util/test_crypto_random.c')
-rw-r--r--src/util/test_crypto_random.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/test_crypto_random.c b/src/util/test_crypto_random.c
index 5e159d949..b9cbbdf76 100644
--- a/src/util/test_crypto_random.c
+++ b/src/util/test_crypto_random.c
@@ -33,6 +33,7 @@ test (enum GNUNET_CRYPTO_Quality mode)
33 unsigned int *b2; 33 unsigned int *b2;
34 int i; 34 int i;
35 unsigned long long n; 35 unsigned long long n;
36 struct GNUNET_Uuid tf;
36 37
37 for (i = 0; i < 1024; i++) 38 for (i = 0; i < 1024; i++)
38 GNUNET_break (1024 > (buf[i] = GNUNET_CRYPTO_random_u32 (mode, 1024))); 39 GNUNET_break (1024 > (buf[i] = GNUNET_CRYPTO_random_u32 (mode, 1024)));
@@ -53,6 +54,8 @@ test (enum GNUNET_CRYPTO_Quality mode)
53 54
54 for (n = 10; n < 1024LL * 1024LL * 1024LL; n *= 10) 55 for (n = 10; n < 1024LL * 1024LL * 1024LL; n *= 10)
55 GNUNET_break (n > GNUNET_CRYPTO_random_u64 (mode, n)); 56 GNUNET_break (n > GNUNET_CRYPTO_random_u64 (mode, n));
57 GNUNET_CRYPTO_random_timeflake (mode,
58 &tf);
56 return 0; 59 return 0;
57} 60}
58 61