Go to file
2025-06-03 08:43:29 +02:00
.github ci: placate dr zizmor 2025-06-03 08:26:20 +02:00
docs Update parameters.md (#196) 2025-03-15 10:03:54 +08:00
src/argon2 Add get_default_parameters & UnsupportedParametersError to API docs 2025-02-22 08:45:03 +01:00
tests Add a multithreaded stress test (#199) 2025-05-03 12:45:47 +02: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 Update & rename Ruff 2025-06-03 07:38:47 +02:00
.python-version-default Use 3.13 in dev 2024-10-12 15:01:27 +02:00
.readthedocs.yaml Split docs targets for faster builds (#194) 2025-02-22 09:43:10 +01:00
CHANGELOG.md Prepare 25.1.0 2025-06-03 08:43:29 +02: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 Clean up trove classifiers 2025-06-03 08:07:12 +02:00
README.md Shields isn't PEP 639-ready 2025-02-22 10:36:26 +01:00
tox.ini Switch to dependency groups (#202) 2025-06-03 08:02:51 +02:00
zizmor.yml ci: pin & trust 2025-06-03 08:21:50 +02:00

argon2-cffi: Argon2 for Python

Documentation 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.