diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-08 15:28:37 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-08 17:33:05 -0800 |
| commit | c5b5bd910507520f7974a156a1de9d187f23bc2f (patch) | |
| tree | 9766716c795d88fe902c7196696c1389d76717ba /src/core/init.c | |
| parent | 4b166dd8ae417b818a5ba214d8f2e648ac1d5be9 (diff) | |
| download | nng-c5b5bd910507520f7974a156a1de9d187f23bc2f.tar.gz nng-c5b5bd910507520f7974a156a1de9d187f23bc2f.tar.bz2 nng-c5b5bd910507520f7974a156a1de9d187f23bc2f.zip | |
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.
Diffstat (limited to 'src/core/init.c')
| -rw-r--r-- | src/core/init.c | 6 |
1 files changed, 6 insertions, 0 deletions
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(); } |
