jargon2-api
jargon2-api copied to clipboard
How to properly check if an encoded hash can be verified?
Currently I'm doing the following to check if the an encoded hash/password can be verified:
verifier.hash(encodedHash).verifyEncoded()
Since I have different encoders (not just argon2).
However this seems overkill and also may throw an exception for other reasons (e.g., empty password).
So my question is if there currently is a better way to achieve this trough the provided API? Or do you recommend implement a check myself (e.g., something like startsWith...
)?