3 ms·
> mt_rand() performs worse than CSPRNGs, funny enough Because the Mersenne twister is outdated technology, which is bad and slow. Use pcg instead. > If /dev/
by rurban 11y ago
> mt_rand() performs worse than CSPRNGs, funny enough
Because the Mersenne twister is outdated technology, which
is bad and slow. Use pcg instead.
> If /dev/urandom drains entropy, that's a bug that your OS should fix.
Defying logic? Without a HW source for noise that's impossible. Even if people are arguing being practical to drop security, you should not be convinced.
I didn't see tests which would confirm this theory.
> Yeah, there is no pgc_random() function in PHP though
Writing that binding would cost a php-c dev 20 minutes. But they should not.
The problem is the bike shedding to replace that in the stdlib for rand(). Better, faster? But...
- sarciszewski 11y ago> Writing that binding would cost a php-c dev 20 minutes. Most PHP devs are not C devs.