X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpassword%2FEncryptedPassword.php;h=d1774ba8af0149aa688d9d793c1426d2188c4e92;hb=3074a4521a18e78e52ba44cc7c185bac7af4a866;hp=0ea3c6319860e8c7621aa372d5a464e7e63d3232;hpb=4cb9c1a24bde6e29c5e8f05c7cd1de54ffdd342a;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'],