3 ms·
> There are all kinds of apps that might not need crypto quality randomness, but do at least need the random number streams to be different between invocations
by sarciszewski 12y ago
> There are all kinds of apps that might not need crypto quality randomness, but do at least need the random number streams to be different between invocations of the program!
If you need high quality randomness, you probably should use urandom. If no where else, when the program is first executed.
And if you're on Windows: https://github.com/php/php-src/blob/e6ea376a91514c59d21f4b53ccbb8c06fa42447b/win32/winutil.c#L80-L123 https://github.com/php/php-src/blob/e6ea376a91514c59d21f4b53...
- pbsd 12y agoOn Windows, the easy way is to call `rand_s`: http://msdn.microsoft.com/en-us/library/sxtz2fa8.aspx http://msdn.microsoft.com/en-us/library/sxtz2fa8.aspx