Skip to main content

The secure Argon2 password hashing algorithm.

Project description

Documentation Status https://travis-ci.org/hynek/argon2_cffi.svg?branch=master https://codecov.io/github/hynek/argon2_cffi/branch/master/graph/badge.svg https://ci.appveyor.com/api/projects/status/3faufu7qgwc8nv2v/branch/master?svg=true https://www.irccloud.com/invite-svg?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1

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
'$argon2i$v=19$m=512,t=2,p=2$5VtWOO3cGWYQHEMaYGbsfQ$AcmqasQgW/wI6wAHAMk4aQ'
>>> ph.verify(hash, "s3kr3tp4ssw0rd")
True
>>> 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 2.7, 3.4+, and PyPy.

Release Information

16.2.0 (2016-09-10)

Vendoring Argon2 @ 4844d2fee15d44cb19296ddf36029326d17c5aa3

Changes:

  • Fix compilation on debian jessie. #13

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.

msinttypes

In order to be able to compile on Visual Studio 2008 and Visual Studio 2010 which are required for Python 2.7 and 3.4 respectively, we also ship two C headers with integer types. They are from the msinttypes project (auto-import on GitHub) and licensed under New BSD:

Copyright (c) 2006-2013 Alexander Chemeris

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the product nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘’AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

Uploaded Source

Built Distributions

argon2_cffi-16.2.0-cp35-cp35m-win_amd64.whl (39.2 kB view details)

Uploaded CPython 3.5m Windows x86-64

argon2_cffi-16.2.0-cp35-cp35m-win32.whl (35.8 kB view details)

Uploaded CPython 3.5m Windows x86

argon2_cffi-16.2.0-cp35-cp35m-macosx_10_6_intel.whl (56.3 kB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

argon2_cffi-16.2.0-cp34-cp34m-win_amd64.whl (34.7 kB view details)

Uploaded CPython 3.4m Windows x86-64

argon2_cffi-16.2.0-cp34-cp34m-win32.whl (33.9 kB view details)

Uploaded CPython 3.4m Windows x86

argon2_cffi-16.2.0-cp34-cp34m-macosx_10_6_intel.whl (56.3 kB view details)

Uploaded CPython 3.4m macOS 10.6+ intel

argon2_cffi-16.2.0-cp27-cp27m-win_amd64.whl (35.0 kB view details)

Uploaded CPython 2.7m Windows x86-64

argon2_cffi-16.2.0-cp27-cp27m-win32.whl (33.8 kB view details)

Uploaded CPython 2.7m Windows x86

argon2_cffi-16.2.0-cp27-cp27m-macosx_10_6_intel.whl (56.2 kB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

File hashes

Hashes for argon2_cffi-16.2.0.tar.gz
Algorithm Hash digest
SHA256 c3e8250e225624b03da3cea0e416b9ebf9d56e352edb4aa811856c26750078b6
MD5 856c96cc3d344b31a36557ef5a93b336
BLAKE2b-256 5335ff03f0fbe3a1d617666806ed8cdf5db82bd3afa7f17b7865f29170be5335

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 0da17ef0be7d7d6a4205234fb56a417bb1548111e6f2b2abf2678650ee99c2e0
MD5 f51ed1de337659c0f1b02996e33b4d2b
BLAKE2b-256 d89daea6699969a09c6414a5097b0e0b32932204b704d715241bba530aad0cd5

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 40e038d6943136e1b2065c254974ba90ec7fbd91bdad3c68d346c2b3614c55a0
MD5 8537c683c8ad279bc66190543a1bfea6
BLAKE2b-256 9c2ffb6a7063ca2f32434c9ccce529559a5e79ad1b8cdf81655497e8ea10d337

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 51a87fb9f877674fac872e16fe939dbd50311d65b37000ca9ed0e3e606907b31
MD5 4f214954ff291ca1ee1fe63b54b39e93
BLAKE2b-256 b83bfd64e2375b6c3a2152ea8e2bb299906f2196ed7b35454e0d8daa1fbe6f5e

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 c39f0c5bbb27ab2c48a3fadff41d3195b120c9c907c515d7dbba9140ea4855fe
MD5 de769cb319fb83690629b8badf806cee
BLAKE2b-256 5e2cab1c2015010aac78d7b7a786caec81f63e8dd53d4d41dbec245c7ea1bfd8

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 8f5cb2a9144878c13d4a4611cbeddd07373a3d8886161b447121baaa29b5f07e
MD5 0b92d936fdeb903b67c838a247b5e5cd
BLAKE2b-256 8eaa73f78852c7470806bcbd22dabfd0f93cf95d032f81bb7b3d42e53e7203a8

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp34-cp34m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp34-cp34m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 80c22424fc53c43dbe1086a8bc7208cfc098277bdc8488aa29a720313edbef23
MD5 196e2bf3a9dd2a70cfdd0a00f20eec37
BLAKE2b-256 cbf54778c1907dae7d8a016f534e68835c8863aac981b278540ecb0fd6c5f889

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 8a4e7bd73c7f0009663680e01278be0e12b11e462a6dc4f607e1e23ccb19add0
MD5 5b1d5d445a39f14b9601c154c360b2ab
BLAKE2b-256 800052df9299ed89d69da7d5638fb27d86fb3984530b1ebb3faf0291448464ba

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp27-cp27m-win32.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 1e0e932529e0bdf062263b0ea4bb45fba7835a74e25bf1d00d6c0ff8a1da2bc4
MD5 57a2d9d96ed7a824c0eb1e486cb9898b
BLAKE2b-256 bbb8efdf3a35ab03273757e388808e82ca816e7af64c8b09a76d11340b94634d

See more details on using hashes here.

File details

Details for the file argon2_cffi-16.2.0-cp27-cp27m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for argon2_cffi-16.2.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 ede5b858f56bc2cf82a094e892ed8050521c5b203a7a0500b4989aea93e90f2d
MD5 1719a4d8ae71e8e10e6f4836cd5c4ca9
BLAKE2b-256 e28f6de3173fb0c167f40692bd3abeab2bec7a9674c69e7425c4dcd57ad45c13

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