argon2-cffi: Argon2 for Python
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
Project Links
- PyPI
- GitHub
- Documentation
- Changelog
- Funding
- The low-level Argon2 CFFI bindings are maintained in the separate argon2-cffi-bindings project.
Release Information
Added
- Official support for Python 3.13 and 3.14. No code changes were necessary.
Removed
- Python 3.7 is not supported anymore. #186
Changed
-
argon2.PasswordHasher.check_needs_rehash()now also accepts bytes like the rest of the API. #174 -
Improved parameter compatibility handling for Pyodide / WebAssembly environments. #190
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.
Metadata
Release files for argon2-cffi 25.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| argon2_cffi-25.1.0.tar.gz | 45.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| argon2_cffi-25.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.4 kB
Release files / argon2_cffi-25.1.0.tar.gz
| Download URL | argon2_cffi-25.1.0.tar.gz |
|---|---|
| Size | 45.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
694ae5cc8a42f4c4e2bf2ca0e64e51e23a040c6a517a85074683d3959e1346c1
|
|
BLAKE2b-256 checksum How to use checksums |
0e89ce5af8a7d472a67cc819d5d998aa8c82c5d860608c4db9f46f1162d7dab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2025.
Transparency logRelease files / argon2_cffi-25.1.0-py3-none-any.whl
| Download URL | argon2_cffi-25.1.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdc8b074db390fccb6eb4a3604ae7231f219aa669a2652e0f20e16ba513d5741
|
|
BLAKE2b-256 checksum How to use checksums |
4fd3a8b22fa575b297cd6e3e3b0155c7e25db170edf1c74783d6a31a2490b8d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2025.
Transparency log