X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Fpassword%2FEncryptedPassword.php;h=d1774ba8af0149aa688d9d793c1426d2188c4e92;hb=22ac82f4cd7960735339d23865fce21665ea9c17;hp=0ea3c6319860e8c7621aa372d5a464e7e63d3232;hpb=d066d5d4065c0553fb9deb069f98af6cb222e610;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'],