dan142 / laravel-hashing-mysql
v1.0.0
2024-01-16 12:51 UTC
Requires
- php: ^7.3|^8.0
- illuminate/support: ^5.6|^6.0|^7.0|^8.0|^9.0|^10.0
Requires (Dev)
- orchestra/testbench: ^3.6|^4.0|^5.0|^6.0|^7.0|^8.0
- phpunit/phpunit: ^7.0|^8.0|^9.0|^10.0
README
Laravel MySQL Hasher
Adds support for the password hashing algorithms used by MySQL's now-deprecated PASSWORD() and OLD_PASSWORD() functions to the Laravel Hasher. This is intended to assist in migration from these to more modern and secure algorithms.
Installation
Add the package with composer.
composer require dan142/laravel-hashing-mysql
Using as the default driver
Edit config/hashing.php and change the driver to either mysqlpassword or mysqloldpassword, depending on which you need.
'driver' => 'mysqlpassword',
Using independently of the default driver
You can specify the driver you'd like to use when using the Hash facade like so:
Hash::driver('mysqlpassword')->make("hash");
Hash::driver('mysqloldpassword')->make("hash");