argon2_cffi

Release v15.0.0 (What’s new?).

Argon2 won the Password Hashing Competition and argon2_cffi is the simplest way to use it in Python and PyPy:

>>> import argon2
>>> hash = argon2.hash_password(b"secret")
>>> hash   
b'$argon2i$m=512,t=2,p=2$c29tZXNhbHQ$2IdoNVglVTxb9w4YVJqW8w'
>>> argon2.verify_password(hash, b"secret")
True
>>> argon2.verify_password(hash, b"wrong")
Traceback (most recent call last):
  ...
argon2.exceptions.VerificationError: Decoding failed

argon2_cffi’s documentation lives at Read the Docs, the code on GitHub. It’s rigorously tested on Python 2.6, 2.7, 3.3+, and PyPy.

Indices and tables