diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-includes/random_compat/random_bytes_com_dotnet.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-includes/random_compat/random_bytes_com_dotnet.php Mon Oct 14 17:39:30 2019 +0200 @@ -0,0 +1,83 @@ +GetRandom($bytes, 0)); + if (RandomCompat_strlen($buf) >= $bytes) { + /** + * Return our random entropy buffer here: + */ + return RandomCompat_substr($buf, 0, $bytes); + } + ++$execCount; + } while ($execCount < $bytes); + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); +} +endif;