# `argon2_cffi`

Release v18.3.0 (What’s new?).

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
    '$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

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.

## User’s Guide

- Argon2
- Installation
- API Reference
- Choosing Parameters
- CLI
- Frequently Asked Questions

## Project Information

- Backward Compatibility
- How To Contribute
- Changelog
- Credits & License

# Indices and tables

- Index
- Search Page