Skip to main content

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

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


Full Changelog →

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)

Source distribution for argon2-cffi 25.1.0
File Size Uploaded
argon2_cffi-25.1.0.tar.gz 45.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argon2-cffi 25.1.0
File Interpreter ABI Platform
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 log

Release 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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page