Go to file
2018-08-19 06:47:17 +02:00
.github Fix links 2018-01-06 13:19:18 +01:00
docs Fix urls 2018-08-19 06:46:26 +02:00
extras Update vendored Argon2 2018-01-06 11:24:52 +01:00
src/argon2 Prepare 18.2.0 2018-08-19 06:47:17 +02:00
tests Adapt default params to RFC, add necessary hash agility (#41) 2018-08-19 05:49:35 +02:00
.coveragerc Fix coverage reporting 2018-03-17 12:12:50 +01:00
.gitignore Fix coverage reporting 2018-03-17 12:12:50 +01:00
.gitmodules Move libargon2 into extras dir too 2015-12-11 14:06:04 +01:00
.pre-commit-config.yaml update black 2018-06-23 14:17:04 +02:00
.readthedocs.yml Overall polish 2018-01-06 09:40:30 +01:00
.travis.yml Python 3.7 (#39) 2018-07-06 10:55:59 +02:00
appveyor.yml Stop using pip.exe (#37) 2018-04-21 13:07:28 +02:00
AUTHORS.rst Fix links 2018-01-06 13:19:18 +01:00
CHANGELOG.rst Prepare 18.2.0 2018-08-19 06:47:17 +02:00
codecov.yml Stop codecov comments 2018-06-18 08:25:21 +02:00
FAQ.rst Improve docs 2018-07-06 12:22:10 +02:00
LICENSE Initial work 2015-12-07 17:14:57 +01:00
MANIFEST.in Stop codecov comments 2018-06-18 08:25:21 +02:00
pyproject.toml wtf 2018-06-23 14:48:57 +02:00
README.rst Fix urls 2018-08-19 06:46:26 +02:00
setup.cfg Ignore E203 wholesale 2018-06-18 07:24:33 +02:00
setup.py Adapt default params to RFC, add necessary hash agility (#41) 2018-08-19 05:49:35 +02:00
tox.ini Python 3.7 (#39) 2018-07-06 10:55:59 +02:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=====================================
CFFI-based Argon2 Bindings for Python
=====================================

.. image:: https://img.shields.io/pypi/v/argon2_cffi.svg
   :target: https://pypi.org/project/argon2_cffi/
   :alt: PyPI

.. 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://travis-ci.org/hynek/argon2_cffi.svg?branch=master
   :target: https://travis-ci.org/hynek/argon2_cffi
   :alt: Travis CI status

.. image:: https://ci.appveyor.com/api/projects/status/3faufu7qgwc8nv2v/branch/master?svg=true
   :target: https://ci.appveyor.com/project/hynek/argon2-cffi
   :alt: AppVeyor CI Status

.. image:: https://codecov.io/github/hynek/argon2_cffi/branch/master/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 <https://github.com/p-h-c/phc-winner-argon2>`_ won the `Password Hashing Competition <https://password-hashing.net/>`_ 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.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 <https://pypi.org/project/passlib/>`_ 1.7.0 and later offers `Argon2 support <https://passlib.readthedocs.io/en/stable/lib/passlib.hash.argon2.html>`_ using this library too.

``argon2_cffi``\ s documentation lives at `Read the Docs <https://argon2-cffi.readthedocs.io/>`_, the code on `GitHub <https://github.com/hynek/argon2_cffi>`_.
Its rigorously tested on Python 2.7, 3.4+, and PyPy.