Skip to content

judemille/argon2_cffi

 
 

Repository files navigation

CFFI-based Argon2 Bindings for Python

PyPI

Documentation Status

Travis CI status

AppVeyor CI Status

Test Coverage

IRC

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

Note

passlib 1.7.0 and later offers Argon2 support using this library too.

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.

About

Secure Password Hashes for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 65.0%
  • C 21.2%
  • PowerShell 9.4%
  • Batchfile 4.4%