*/
class BcryptPassword extends ParameterizedPassword {
protected function getDefaultParams() {
- return array(
+ return [
'rounds' => $this->config['cost'],
- );
+ ];
}
protected function getDelimiter() {
// Replace + with ., because bcrypt uses a non-MIME base64 format
strtr(
// Random base64 encoded string
- base64_encode( MWCryptRand::generate( 16, true ) ),
+ base64_encode( random_bytes( 16 ) ),
'+', '.'
),
0, 22