Skip to main content

Argon2 for Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argon2_cffi-25.1.0.tar.gz (45.7 kB view details)

Uploaded Source

Built Distribution

argon2_cffi-25.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file argon2_cffi-25.1.0.tar.gz.

File metadata

  • Download URL: argon2_cffi-25.1.0.tar.gz
  • Upload date:
  • Size: 45.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for argon2_cffi-25.1.0.tar.gz
Algorithm Hash digest
SHA256 694ae5cc8a42f4c4e2bf2ca0e64e51e23a040c6a517a85074683d3959e1346c1
MD5 fbf9e4302b32894a857a12ff0bf7c5f0
BLAKE2b-256 0e89ce5af8a7d472a67cc819d5d998aa8c82c5d860608c4db9f46f1162d7dab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for argon2_cffi-25.1.0.tar.gz:

Publisher: pypi-package.yml on hynek/argon2-cffi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file argon2_cffi-25.1.0-py3-none-any.whl.

File metadata

  • Download URL: argon2_cffi-25.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for argon2_cffi-25.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdc8b074db390fccb6eb4a3604ae7231f219aa669a2652e0f20e16ba513d5741
MD5 7e1606a260c68e20c085d53c1bfa8962
BLAKE2b-256 4fd3a8b22fa575b297cd6e3e3b0155c7e25db170edf1c74783d6a31a2490b8d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for argon2_cffi-25.1.0-py3-none-any.whl:

Publisher: pypi-package.yml on hynek/argon2-cffi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page