X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FCryptRand.php;h=474c564aeb244ac1ec2f1a81d3cbebed4f025a62;hb=7d8ea236ca7b0c30dd4665cd84adb88fe29c4938;hp=4b4a913569d90430e8a7140e6e0a6ea30f91fe2b;hpb=f7e1770fb832aa77bf4e16ce8cc815f2b24dd10d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/CryptRand.php b/includes/libs/CryptRand.php index 4b4a913569..474c564aeb 100644 --- a/includes/libs/CryptRand.php +++ b/includes/libs/CryptRand.php @@ -94,9 +94,9 @@ class CryptRand { $files[] = dirname( __DIR__ ); foreach ( $files as $file ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $stat = stat( $file ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( $stat ) { // stat() duplicates data into numeric and string keys so kill off all the numeric ones foreach ( $stat as $k => $v ) { @@ -234,7 +234,6 @@ class CryptRand { * @return string Raw binary random data */ public function generate( $bytes, $forceStrong = false ) { - $bytes = floor( $bytes ); static $buffer = ''; if ( is_null( $this->strong ) ) { @@ -311,9 +310,9 @@ class CryptRand { } // /dev/urandom is generally considered the best possible commonly // available random source, and is available on most *nix systems. - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $urandom = fopen( "/dev/urandom", "rb" ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); // Attempt to read all our random data from urandom // php's fread always does buffered reads based on the stream's chunk_size