$state .= rand() . uniqid( mt_rand(), true );
// Include some information about the filesystem's current state in the random state
- $files = array();
+ $files = [];
// We know this file is here so grab some info about ourselves
$files[] = __FILE__;
": Falling back to using a pseudo random state to generate randomness.\n" );
}
while ( strlen( $buffer ) < $bytes ) {
- $buffer .= MWCryptHash::hmac( $this->randomState(), mt_rand() );
+ $buffer .= MWCryptHash::hmac( $this->randomState(), strval( mt_rand() ) );
// This code is never really cryptographically strong, if we use it
// at all, then set strong to false.
$this->strong = false;