aboutsummaryrefslogtreecommitdiff
path: root/src/lib/util/crypto_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/crypto_hash.c')
-rw-r--r--src/lib/util/crypto_hash.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/util/crypto_hash.c b/src/lib/util/crypto_hash.c
index 4f3acde77..5a8f99c1d 100644
--- a/src/lib/util/crypto_hash.c
+++ b/src/lib/util/crypto_hash.c
@@ -100,10 +100,7 @@ void
100GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, 100GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
101 struct GNUNET_HashCode *result) 101 struct GNUNET_HashCode *result)
102{ 102{
103 for (ssize_t i = (sizeof(struct GNUNET_HashCode) / sizeof(uint32_t)) - 1; 103 GNUNET_CRYPTO_random_block(mode, result, sizeof (*result));
104 i >= 0;
105 i--)
106 result->bits[i] = GNUNET_CRYPTO_random_u32 (mode, UINT32_MAX);
107} 104}
108 105
109 106