config/hashing.php
configuration file. There are currently three supported drivers: Bcrypt and Argon2 (Argon2i and Argon2id variants).
if hashing file is not there you can download it from here https://raw.githubusercontent.com/laravel/laravel/master/config/hashing.php
Hi,
There is no hashing.php in the config directory, can I safely copy the file and put it in there?
thoughts?
also what about this function:
public function setPasswordAttribute($value)
{
$this->attributes[‘password’] = bcrypt($value);
}
this is in Corals/core/User/Models/User.php
For testing I change the following driver hardcode to argon2id inside the bcrypt function, only then it will work.
if (! function_exists(‘bcrypt’)) {
/**
* Hash the given value against the bcrypt algorithm.
*
* @param string $value
* @param array $options
* @return string
*/
function bcrypt($value, $options = [])
{
return app(‘hash’)->driver(‘argon2id’)->make($value, $options);
}
}
vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
Can you tell me best practice?
Please login or Register to submit your answer