From c5b5bd910507520f7974a156a1de9d187f23bc2f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 8 Jan 2017 15:28:37 -0800 Subject: New ISAAC pRNG. This replaces other local hacks for random data. Platforms must seed the pRNGs by offering an nni_plat_seed_prng() routine. Implementations for POSIX using various options (including the /dev/urandom device) are supplied. --- src/core/init.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/init.c') diff --git a/src/core/init.c b/src/core/init.c index 3ae10a21..f10173c8 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -14,6 +14,11 @@ static int nni_init_helper(void) { + int rv; + + if ((rv = nni_random_init()) != 0) { + return (rv); + } nni_tran_init(); return (0); } @@ -30,5 +35,6 @@ void nni_fini(void) { nni_tran_fini(); + nni_random_fini(); nni_plat_fini(); } -- cgit v1.2.3-70-g09d2