dan142 / laravel-hashing-mysql
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/dan142/laravel-hashing-mysql
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");