How implement new hash algo?


#1

Hi everyone

I need to implement (scala) another algo for password hashing than Bcrypt for security concern.(Argon2)
what is the process to handle that, wich classes and traits are concerned and for example how to regitser this new algo with the registry.

Thanks for any help.
Phil


#2

It’s documented how you should register your new hasher. And to implement a new hasher you should create a new class that extends the PasswordHasher trait. As example you could start with the BCryptPasswordHasher.


#3

Thx for your help
I’ll give it a try