From dd00a3c923ba94986efba2289c1b0e22b7c12c97 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 22 Mar 2017 10:48:57 +1100 Subject: util/rand_xor: add function to seed rand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit V2: pass the seed to the seed function so that we can isolate its uses. Stop leaking fd when urandom couldn't be read. Reviewed-by: Grazvydas Ignotas Reviewed-by: Nicolai Hähnle --- src/util/rand_xor.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util/rand_xor.h') diff --git a/src/util/rand_xor.h b/src/util/rand_xor.h index d5144e98230..532d549bcda 100644 --- a/src/util/rand_xor.h +++ b/src/util/rand_xor.h @@ -26,8 +26,12 @@ #define RAND_XOR_H #include +#include uint64_t rand_xorshift128plus(uint64_t *seed); +void +s_rand_xorshift128plus(uint64_t *seed, bool randomised_seed); + #endif /* RAND_XOR_H */ -- cgit v1.2.3