From: Kirill Shutemov Date: 2006-11-14T00:53:46+09:00 Subject: Re: External entropy pool for random number generator On 11/13/06, Nobuyoshi Nakada wrote: > Hi, > > At Mon, 13 Nov 2006 23:14:33 +0900, > Kirill Shutemov wrote in [ruby-core:09529]: > > > Can you elaborate how much it is useful in general enough to make it > > > built in? The questions I have are > > > > > > * why do we need to call srand every time? > > > > To make rand() not deterministic. The other way is modification > > genrand_int32() to use entropy pool directly. It's more careful, but > > it makes genrand_int32() ruby specific(code from rb_f_rand() moves to > > genrand_int32()). Should I do it? > > I don't think it enough general. Couldn't OpenSSL::Random be > an alternative? Yes, it's an alternative, but not every platform have openssl. :(