Support the ongoing development of Laravel.io →
Authentication

Please preface this with "I'm REALLY new to Laravel". I would like to be able to add custom hasher implementations to support legacy authentication tables. In my current case, it's SHA512 with a 20 char salt, rehashed 20 times (an old rails app using AuthLogic).

Using \Illuminate\Contracts\Hashing\BcryptHasher as an example, I was able to create a functioning hasher, then, using the numerous examples online, added an App\Providers\SHA512HashServiceProvider. This basically worked, but it seems I'm not doing it quite right since I believe I should be able to configure it all in config/hash.php.

This would be ideal so I can set my sha512 hasher as default when I need to or just use the bcrypt or argon2 provided.

The current HashServiceProvider uses HashManager to respond to the configs in app/hash.php and pick the right implementation. How do I get my implementation wedged in there without hacking on the core files?

Is there a standard way to add (as opposed to 'override') hashers that can be selected from app/hash.php?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.