funcool / buddy-hashers

Collection of password hashers.
https://funcool.github.io/buddy-hashers/latest/
Apache License 2.0
75 stars 16 forks source link

must-update? should also accept explicit parameters #30

Open coreagile opened 2 months ago

coreagile commented 2 months ago

For my uses, the default parameters for :argon2id aren't sufficient for my hardware, so I hash with an extra iteration. Sadly, when I verify a password, it always comes back with {:update true} because passwords are always hashed with custom parameters.

I should be able to pass those explicit parameters to verify, so it can then pass those along to must-update?

For example:

(hashers/verify attempt encrypted {:limit #{:argon2id}, :params {:iterations 3, :memory 65536, :parallelism 1}})

Alternatively, we should be able to reset the global parameters.