You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
793 B
44 lines
793 B
2 years ago
|
# SPDX-License-Identifier: MIT
|
||
|
|
||
|
|
||
|
class Argon2Error(Exception):
|
||
|
"""
|
||
|
Superclass of all argon2 exceptions.
|
||
|
|
||
|
Never thrown directly.
|
||
|
"""
|
||
|
|
||
|
|
||
|
class VerificationError(Argon2Error):
|
||
|
"""
|
||
|
Verification failed.
|
||
|
|
||
|
You can find the original error message from Argon2 in ``args[0]``.
|
||
|
"""
|
||
|
|
||
|
|
||
|
class VerifyMismatchError(VerificationError):
|
||
|
"""
|
||
|
The secret does not match the hash.
|
||
|
|
||
|
Subclass of :exc:`argon2.exceptions.VerificationError`.
|
||
|
|
||
|
.. versionadded:: 16.1.0
|
||
|
"""
|
||
|
|
||
|
|
||
|
class HashingError(Argon2Error):
|
||
|
"""
|
||
|
Raised if hashing failed.
|
||
|
|
||
|
You can find the original error message from Argon2 in ``args[0]``.
|
||
|
"""
|
||
|
|
||
|
|
||
|
class InvalidHash(ValueError):
|
||
|
"""
|
||
|
Raised if the hash is invalid before passing it to Argon2.
|
||
|
|
||
|
.. versionadded:: 18.2.0
|
||
|
"""
|