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("s3kr3tp4ssw0rd")
>>> hash  # doctest: +SKIP
'$argon2id$v=19$m=102400,t=2,p=8$tSm+JOWigOgPZx/g44K5fQ$WDyus6py50bVFIPkjA28lQ'
>>> ph.verify(hash, "s3kr3tp4ssw0rd")
True
>>> ph.check_needs_rehash(hash)
False
>>> ph.verify(hash, "t0t411ywr0ng")
Traceback (most recent call last):
  ...
argon2.exceptions.VerifyMismatchError: The password does not match the supplied hash

argon2-cffi’s documentation lives at Read the Docs, the code on GitHub. It’s rigorously tested on Python 3.5+, and PyPy3.

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

Release Information

21.1.0 (2021-08-29)

Vendoring Argon2 @ 62358ba (20190702)

Backward-incompatible changes:

Microsoft stopped providing the necessary SDKs to ship Python 2.7 wheels and currenly the downloads amount to 0.09%. Therefore we have decided that Python 2.7 is not supported anymore.

Deprecations:

none

Changes:

There are indeed no changes whatsoever to the code of argon2-cffi. The Argon2 project also hasn’t tagged a new release since July 2019. There also don’t seem to be any important pending fixes.

This release is mainly about improving the way binary wheels are built (abi3 on all platforms).

Full changelog.

Credits & License

argon2-cffi is maintained by Hynek Schlawack and released under the MIT license.

The development is kindly supported by Variomedia AG.

A full list of contributors can be found in GitHub’s overview.

Vendored Code

Argon2

The original Argon2 repo can be found at https://github.com/P-H-C/phc-winner-argon2/.

Except for the components listed below, the Argon2 code in this repository is copyright (c) 2015 Daniel Dinu, Dmitry Khovratovich (main authors), Jean-Philippe Aumasson and Samuel Neves, and under CC0 license.

The string encoding routines in src/encoding.c are copyright (c) 2015 Thomas Pornin, and under CC0 license.

The BLAKE2 code in src/blake2/ is copyright (c) Samuel Neves, 2013-2015, and under CC0 license.

The authors of Argon2 also were very helpful to get the library to compile on ancient versions of Visual Studio for ancient versions of Python.

The documentation also quotes frequently from the Argon2 paper to avoid mistakes by rephrasing.

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.1.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distributions

argon2_cffi-21.1.0-pp37-pypy37_pp73-win_amd64.whl (37.9 kB view details)

Uploaded PyPy Windows x86-64

argon2_cffi-21.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (36.9 kB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

argon2_cffi-21.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl (34.1 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

argon2_cffi-21.1.0-pp36-pypy36_pp73-win32.whl (36.8 kB view details)

Uploaded PyPy Windows x86

argon2_cffi-21.1.0-pp36-pypy36_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (36.9 kB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

argon2_cffi-21.1.0-pp36-pypy36_pp73-macosx_10_7_x86_64.whl (34.1 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

argon2_cffi-21.1.0-cp35-abi3-win_amd64.whl (40.2 kB view details)

Uploaded CPython 3.5+ Windows x86-64

argon2_cffi-21.1.0-cp35-abi3-win32.whl (37.0 kB view details)

Uploaded CPython 3.5+ Windows x86

argon2_cffi-21.1.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (96.1 kB view details)

Uploaded CPython 3.5+ manylinux: glibc 2.5+ x86-64

argon2_cffi-21.1.0-cp35-abi3-macosx_10_14_x86_64.whl (38.9 kB view details)

Uploaded CPython 3.5+ macOS 10.14+ x86-64

File details

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

File metadata

  • Download URL: argon2-cffi-21.1.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2-cffi-21.1.0.tar.gz
Algorithm Hash digest
SHA256 f710b61103d1a1f692ca3ecbd1373e28aa5e545ac625ba067ff2feca1b2bb870
MD5 f33bc18f2c2438f685ba1f0bbd2b86a4
BLAKE2b-256 7b39a26aaef5c3f0c6cfd67c80599b5b40a794fdab46f4ee3be925d71e2f9596

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-pp37-pypy37_pp73-win_amd64.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-pp37-pypy37_pp73-win_amd64.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: PyPy, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 566ffb581bbd9db5562327aee71b2eda24a1c15b23a356740abe3c011bbe0dcb
MD5 7968590bda790e0242e8c50ee10d8c8f
BLAKE2b-256 b5a00c07b8ddcf256e78f78fffcec8f0137a62d76cf8eaa36c71dcfda3da6f01

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for argon2_cffi-21.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 165cadae5ac1e26644f5ade3bd9c18d89963be51d9ea8817bd671006d7909057
MD5 7a19b0d1c390164b21628a2851200e35
BLAKE2b-256 9698ae1837b40ae4ec151a6bde7e1e1b0e2f699a455b5a19fffd545777e5b65c

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: PyPy, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 c7a7c8cc98ac418002090e4add5bebfff1b915ea1cb459c578cd8206fef10378
MD5 6cfd2db632ff1dc9c64c4b19a22e13ad
BLAKE2b-256 20410297c283d17f71b6b604fad001f47b2a81468f8123745c9f5f8335e7e53e

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-pp36-pypy36_pp73-win32.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-pp36-pypy36_pp73-win32.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: PyPy, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-pp36-pypy36_pp73-win32.whl
Algorithm Hash digest
SHA256 bc513db2283c385ea4da31a2cd039c33380701f376f4edd12fe56db118a3b21a
MD5 0a4a0faaf2f13d3c018e47741145df15
BLAKE2b-256 b2193dafb18a5020914192a662e73ca787f20729f318855d1238a1cef096b202

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-pp36-pypy36_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for argon2_cffi-21.1.0-pp36-pypy36_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4ad152c418f7eb640eac41ac815534e6aa61d1624530b8e7779114ecfbf327f8
MD5 61b877519a81a22b399954219875c64d
BLAKE2b-256 dca76a147341431bcc8711835d8d16c42ccf604a0a701b51b286483bbdfb24b0

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-pp36-pypy36_pp73-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-pp36-pypy36_pp73-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 34.1 kB
  • Tags: PyPy, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-pp36-pypy36_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 245f64a203012b144b7b8c8ea6d468cb02b37caa5afee5ba4a10c80599334f6a
MD5 4f24da644bb9ae577c21a5a873b83c8e
BLAKE2b-256 2f02c5cd85d2452887f5e12927f606334bf14c5bf08010892199f5791ff264fb

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-cp35-abi3-win_amd64.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-cp35-abi3-win_amd64.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: CPython 3.5+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-cp35-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 65213a9174320a1aee03fe826596e0620783966b49eb636955958b3074e87ff9
MD5 a4a95d38c786fdece6cd2c4bc729d02f
BLAKE2b-256 553376886db96e6d6977dcfe441a738fd3f5b97963dca2e15305eb4c74412863

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-cp35-abi3-win32.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-cp35-abi3-win32.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: CPython 3.5+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-cp35-abi3-win32.whl
Algorithm Hash digest
SHA256 e4d8f0ae1524b7b0372a3e574a2561cbdddb3fdb6c28b70a72868189bda19659
MD5 e5199e0749ba8e1e84fe3d4f57b1e308
BLAKE2b-256 1ba5f9557aee8dba20888c06156fa27241788deb8d0c6a4eb476b6038ee5d0ae

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for argon2_cffi-21.1.0-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fa7e7d1fc22514a32b1761fdfa1882b6baa5c36bb3ef557bdd69e6fc9ba14a41
MD5 f1914016f99ec1cc33c5300ee1204acf
BLAKE2b-256 5085fa444619ba3709b8969a75bf051375261801d267bb69d6bd1764dabe528f

See more details on using hashes here.

File details

Details for the file argon2_cffi-21.1.0-cp35-abi3-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: argon2_cffi-21.1.0-cp35-abi3-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 38.9 kB
  • Tags: CPython 3.5+, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for argon2_cffi-21.1.0-cp35-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 217b4f0f853ccbbb5045242946ad2e162e396064575860141b71a85eb47e475a
MD5 4ebcb5f30208d3e045e42ddbbf45b598
BLAKE2b-256 2573fc78a52dcf3be8c60587b588af6ec8b02b1aa48a9059438ab451f05983a0

See more details on using hashes here.

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