Need help with argon2-cffi?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

hynek
264 Stars 34 Forks MIT License 286 Commits 6 Opened issues

Description

Secure Password Hashes for Python

Services available

!
?

Need anything else?

Contributors list

# 42,480
Python
sentry
Common ...
12-fact...
259 commits
# 10,322
pre-com...
pypy
jython
travis
5 commits
# 101,505
C
Shell
Twitter
ed25519
2 commits
# 321
Python
Django
django-...
HTML
1 commit
# 211,473
Bash
kafka
python3
passwor...
1 commit
# 15,534
version...
pypi
datadog
python-...
1 commit
# 69,113
blockly
makecod...
Rails
debian
1 commit
# 154,560
Shell
Haskell
async-p...
pem
1 commit
# 187,129
C
Twitter
Flask
Django
1 commit
# 100,448
TeX
kafka
python-...
autobah...
1 commit
# 113,023
Jupyter...
CSS
Shell
python3
1 commit
# 4,357
Python
HTML
Django
wsdl
1 commit

=====================================

CFFI-based Argon2 Bindings for Python

.. image:: https://readthedocs.org/projects/argon2-cffi/badge/?version=stable :target: http://argon2-cffi.readthedocs.io/en/stable/?badge=stable :alt: Documentation Status

.. image:: https://github.com/hynek/argon2-cffi/workflows/CI/badge.svg?branch=main :target: https://github.com/hynek/argon2-cffi/actions?workflow=CI :alt: CI Status

.. image:: https://codecov.io/github/hynek/argon2-cffi/branch/main/graph/badge.svg :target: https://codecov.io/github/hynek/argon2-cffi :alt: Test Coverage

.. image:: https://www.irccloud.com/invite-svg?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1 :target: https://www.irccloud.com/invite?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1 :alt: IRC

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black :alt: Code style: black

.. teaser-begin

Argon2 
_ won the
Password Hashing Competition 
_ and
argon2-cffi
is the simplest way to use it in Python and PyPy:

.. code-block:: pycon

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.checkneedsrehash(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 2.7, 3.5+, and PyPy.

It implements Argon2 version 1.3, as described in

Argon2: the memory-hard function for password hashing and other applications 
_.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.