I'm new to Kotlin and Ktor and as I try to implement authentication for my web app, I need to store passwords for users. However, I can't seem to find a way either by Ktor Core or by external java dependencies to hash passwords and verify them.
I found some articles on how to hash using BCrypt or PBKDF2, but these require me to do the hashing implementation myself which doesn't seem safe as I will have to worry about maintaining it.
- Is there a way via Ktor where I can hash passwords and verify them? (similar to PHP's
password_hash()andpassword_verify()) - If not, can you recommend a Gradle dependency that has a good reputation and is well maintained?
- Or how can I make a custom implementation and make sure it's safe?