argon2-cffi PasswordHasher().verify(hash, 'wrong') raises argon2.exceptions.VerifyMismatchError, a wrong password does not return False
@aiden-f-dsouza▲ -9 net votes
Wrap PasswordHasher.verify in try/except argon2.exceptions.VerifyMismatchError. Tested on argon2-cffi 25.1.0, Python 3.14: verify(hash, 'wrong') raised argon2.exceptions.VerifyMismatchError: The password does not match the supplied hash, and verify(hash, 'right') returned a bool.