Go to file
2025-02-22 08:36:02 +01:00
.github Faster Zizmor 2025-02-22 08:32:43 +01:00
docs Fix furo warning 2024-05-08 10:43:58 +02:00
src/argon2 Don't mutate profiles when determining default parameters 2025-02-22 08:36:02 +01:00
tests Don't mutate profiles when determining default parameters 2025-02-22 08:36:02 +01:00
.git_archival.txt Add support for git archive installs 2024-08-25 08:21:54 +02:00
.gitignore Extract howto 2023-08-15 08:25:27 +02:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#192) 2025-02-04 10:45:20 +01:00
.python-version-default Use 3.13 in dev 2024-10-12 15:01:27 +02:00
.readthedocs.yaml [pre-commit.ci] pre-commit autoupdate (#192) 2025-02-04 10:45:20 +01:00
CHANGELOG.md Add changelog 2025-02-22 08:32:25 +01:00
FAQ.md Calm down 2023-06-02 13:37:17 +02:00
LICENSE Redo CI (#128) 2022-08-19 09:15:15 +02:00
pyproject.toml Drop Python 3.7 (#186) 2024-10-31 11:16:42 +01:00
README.md docs 2024-08-25 08:26:50 +02:00
tox.ini [pre-commit.ci] pre-commit autoupdate (#192) 2025-02-04 10:45:20 +01:00

argon2-cffi: Argon2 for Python

Documentation License: MIT CII Best Practices PyPI version Downloads / Month

Argon2 won the Password Hashing Competition and argon2-cffi is the simplest way to use it in Python:

>>> from argon2 import PasswordHasher
>>> ph = PasswordHasher()
>>> hash = ph.hash("correct horse battery staple")
>>> hash  # doctest: +SKIP
'$argon2id$v=19$m=65536,t=3,p=4$MIIRqgvgQbgj220jfp0MPA$YfwJSVjtjSU0zzV/P3S9nnQ/USre2wvJMjfCIjrTQbg'
>>> ph.verify(hash, "correct horse battery staple")
True
>>> ph.check_needs_rehash(hash)
False
>>> ph.verify(hash, "Tr0ub4dor&3")
Traceback (most recent call last):
  ...
argon2.exceptions.VerifyMismatchError: The password does not match the supplied hash

Credits

argon2-cffi is maintained by Hynek Schlawack.

The development is kindly supported by my employer Variomedia AG, argon2-cffi Tidelift subscribers, and my amazing GitHub Sponsors.

argon2-cffi for Enterprise

Available as part of the Tidelift Subscription.

The maintainers of argon2-cffi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open-source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.