matriphe / laravel-cake13-hash
Laravel 5 package to use legacy CakePHP 1.3 for password hash
Requires
- illuminate/support: 5.*
Requires (Dev)
- phpunit/phpunit: ^5.0|^6.0
This package is auto-updated.
Last update: 2022-10-21 16:12:27 UTC
README
This package is used to replace Laravel's default hash to support legacy CakePHP 1.3 password hash method.
Please use it with your own risk, since CakePHP 1.3 is obselete.
Installation
Using Composer, just run this command below.
composer require matriphe/laravel-cake13-hash
Configuration
After installed, open config/app.php
and find this line.
Illuminate\Hashing\HashServiceProvider::class::class
Comment or remove that line and add this line to override Laravel's hash handling.
Matriphe\Md5Hash\HashServiceProvider::class
Publish config file to hold salt string in config using php artisan vendor:publish
command. This command will create config/cake.php
file.
Open your app/config/core.php
in your old CakePHP 1.3 directory, find Configure::write('Security.salt', 'S0m3S4lt');
and copy the salt.
Usage
Now you can use built in hash function using this command.
Hash::make('password'); // return 94c5b9c5a0d799d938fdad02162ce27651bf81eb bcrypt('password'); // return 94c5b9c5a0d799d938fdad02162ce27651bf81eb
License
The MIT License (MIT). Please see License File for more information.