Skip to main content

The secure Argon2 password hashing algorithm.

Project description

Documentation License: MIT 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

argon2-cffi is available from PyPI, the documentation lives at Read the Docs, the code on GitHub. The low-level Argon2 CFFI bindings are maintained in the separate project argon2-cffi-bindings.

It targets Python 3.6 and newer, and PyPy3. The last version that works with Python 2.7 is 20.1.0, and the last version that works with Python 3.5 is 21.1.0.

argon2-cffi implements Argon2 version 1.3, as described in Argon2: the memory-hard function for password hashing and other applications.

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.

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-21.2.0.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

argon2_cffi-21.2.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file argon2-cffi-21.2.0.tar.gz.

File metadata

  • Download URL: argon2-cffi-21.2.0.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for argon2-cffi-21.2.0.tar.gz
Algorithm Hash digest
SHA256 50936e5ad9e860c5a6678063c5ac732c2fc8a178994cca9e1e7220351f930e9a
MD5 53c6bbfbf9743348e18fbfecca48c57d
BLAKE2b-256 13d56c21a404fade4e90e7b191ff78cff720d9b2dd3e437948c69287dc9236c0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: argon2_cffi-21.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for argon2_cffi-21.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5d7b9d38963c2769cd0dbfc5901ae00eb9bb98a9cb5a2ea0c9c7c4fec3e6b98
MD5 f92349b1267e1234b5d13e3221757f51
BLAKE2b-256 b87d425d4bd00cd2bcf820e20736a6d9e03a35ce3fea605910cea4a6a4fe674d

See more details on using hashes here.

Provenance

Supported by

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