@darrion.kuhn
To change the default hash password in CakePHP, you need to follow these steps:
- Open the file src/Application.php in your CakePHP project.
- Locate the __construct() method and find the following line:
$this->add(new AuthenticationServiceProvider());
- After that line, add the following code to override the default password hasher:
$this->authentication->addUnauthenticatedCallable(function () {
return new AuthenticationPasswordHasherDefaultPasswordHasher([
'hashType' => '
- Save the changes and exit the file.
Now, the default password hasher in CakePHP will use your chosen hash type instead of the default one.