From: Rudolf Polzer Date: Sun, 25 Apr 2010 14:26:10 +0000 (+0200) Subject: use /dev/urandom X-Git-Tag: xonotic-v0.1.0preview~43 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0a7dbd059bbbf2985ccd8686985019ee2effa212;p=xonotic%2Fd0_blind_id.git use /dev/urandom --- diff --git a/d0_bignum-gmp.c b/d0_bignum-gmp.c index 93bf0f7..2641449 100644 --- a/d0_bignum-gmp.c +++ b/d0_bignum-gmp.c @@ -37,7 +37,9 @@ void d0_bignum_INITIALIZE(void) d0_bignum_init(&temp); gmp_randinit_mt(RANDSTATE); gmp_randseed_ui(RANDSTATE, time(NULL)); - f = fopen("/dev/random", "rb"); + f = fopen("/dev/urandom", "rb"); + if(!f) + f = fopen("/dev/random", "rb"); if(f) { unsigned char buf[256];