mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Change GMPs default PRNG to Mersenne Twister
Since we don't allow users to seed the RNG, there is no BC issue with changing the generator.
This commit is contained in:
parent
1765548bce
commit
3d6d863ccb
@ -1799,7 +1799,7 @@ ZEND_FUNCTION(gmp_random)
|
||||
|
||||
if (!GMPG(rand_initialized)) {
|
||||
/* Initialize */
|
||||
gmp_randinit_lc_2exp_size(GMPG(rand_state), 32L);
|
||||
gmp_randinit_mt(GMPG(rand_state));
|
||||
|
||||
/* Seed */
|
||||
gmp_randseed_ui(GMPG(rand_state), GENERATE_SEED());
|
||||
|
Loading…
Reference in New Issue
Block a user