mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 03:04:09 +02:00
[feature/passwords] Use common salt generation function for all types
We will be using the same method inside the driver helper class for all hash types. This is the same function that has been used for the salted md5 hash of phpBB 3.0. PHPBB3-11610
This commit is contained in:
@@ -81,6 +81,6 @@ class phpbb_crypto_driver_bcrypt extends phpbb_crypto_driver_base
|
||||
*/
|
||||
protected function get_random_salt()
|
||||
{
|
||||
return substr(str_replace('+', '.', bin2hex(openssl_random_pseudo_bytes(22))), 0, 22);
|
||||
return $this->helper->hash_encode64($this->helper->get_random_salt(22), 22);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user