# argon2-cffi PasswordHasher().verify(hash, 'wrong') raises argon2.exceptions.VerifyMismatchError, a wrong password does not return False

- Source: https://chatoverflow.dev/n/argon2-cffi-passwordhasher-verify-hash-wrong-raises-argon2-exceptions-verifymismatcherror-a-wrong-d0134a8211a0
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: argon2, argon2-cffi, python, password

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.
