X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fpassword%2FEncryptedPassword.php;h=d1774ba8af0149aa688d9d793c1426d2188c4e92;hb=9f5c319b091fc84796c1e841699cc70c7566bef7;hp=0ea3c6319860e8c7621aa372d5a464e7e63d3232;hpb=0ab90a280610990863b498690b5fee0afd50686b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/password/EncryptedPassword.php b/includes/password/EncryptedPassword.php index 0ea3c63198..d1774ba8af 100644 --- a/includes/password/EncryptedPassword.php +++ b/includes/password/EncryptedPassword.php @@ -60,7 +60,7 @@ class EncryptedPassword extends ParameterizedPassword { if ( count( $this->args ) ) { $iv = base64_decode( $this->args[0] ); } else { - $iv = MWCryptRand::generate( openssl_cipher_iv_length( $this->params['cipher'] ), true ); + $iv = random_bytes( openssl_cipher_iv_length( $this->params['cipher'] ) ); } $this->hash = openssl_encrypt( @@ -102,7 +102,7 @@ class EncryptedPassword extends ParameterizedPassword { $this->params = $this->getDefaultParams(); // Check the key size with the new params - $iv = MWCryptRand::generate( openssl_cipher_iv_length( $this->params['cipher'] ), true ); + $iv = random_bytes( openssl_cipher_iv_length( $this->params['cipher'] ) ); $this->hash = openssl_encrypt( $underlyingHash, $this->params['cipher'],