Just take a look at how the hashing
standard works.
There is in the Illuminate\Hashing\HashServiceProvider
the following method
public function register()
{
$this->app->singleton('hash', function () { return new BcryptHasher; });
}
which means, by default, that you are using the BcryptHasher
as an instance.
If you want to implement the hash
alone, you will have to create your own service provider(Provider
) and facades(Facades
) for hashing
and then swap the default file implementations config/app.php
.
More precisely, you will want to trade in the array of providers
Illuminate\Hashing\HashServiceProvider::class
,
with your own service provider(providers
), and the same goes for the array
of aliases
in the same file.
So, as an example, take a look at how the BcryptHasher
implements an interface, and its hash implementation should implement the same interface.
That would extend the hash
in Laravel.
Complementary topics
Change the hash used for logging in 5.4
Adding Custom User Providers
Custom auth and hashing Standard 5.1
Creating a Hashing Manager For Our Custom Laravel Hashing
Implementations
Take a look at this soen link
– Alvaro Alves