Go to file
Hynek Schlawack 9bf4953911
Calm down
2023-06-02 13:37:17 +02:00
.github Prepare for OIDC 2023-06-02 13:24:43 +02:00
docs Calm down 2023-06-02 13:37:17 +02:00
src/argon2 Calm down 2023-06-02 13:37:17 +02:00
tests Move to Hatch (#131) 2022-08-24 14:17:58 +02:00
.flake8 Streamline tox.ini / ci.yml 2023-02-07 08:23:23 +01:00
.gitignore Move to Hatch (#131) 2022-08-24 14:17:58 +02:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#144) 2023-05-06 17:21:53 -06:00
.python-version Streamline tox.ini / ci.yml 2023-02-07 08:23:23 +01:00
.readthedocs.yaml Build docs on Jammy / 3.11 2023-06-02 12:52:21 +02:00
AUTHORS.md Convert all top-level docs to Markdown 2022-08-24 15:03:01 +02:00
CHANGELOG.md Add Python 3.12 (#145) 2023-06-02 11:14:36 +00: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 Add Python 3.12 (#145) 2023-06-02 11:14:36 +00:00
README.md Calm down 2023-06-02 13:37:17 +02:00
tox.ini Add Python 3.12 (#145) 2023-06-02 11:14:36 +00:00
typing_examples.py Add Types (#112) 2021-12-08 11:32:57 +01:00

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 and PyPy:

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

Project Information

The low-level Argon2 CFFI bindings are maintained in the separate argon2-cffi-bindings project.

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. Learn more.