Go to file
2019-01-17 10:15:39 +01:00
.github Update CONTRIBUTING.rst 2018-12-17 08:27:35 +01:00
docs Update links to RFC draft 2019-01-17 10:14:42 +01:00
extras More pre-commit, more Python 3.7 2018-12-17 07:43:11 +01:00
src/argon2 Prepare 19.1.0 2019-01-17 10:15:39 +01:00
tests Made extract_parameters work with argon v18 hashes. (#42) 2018-08-20 11:20:18 +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 pre-commit autoupdate 2019-01-17 09:54:53 +01:00
.readthedocs.yml Overall polish 2018-01-06 09:40:30 +01:00
.travis.yml drop sudo 2019-01-17 09:56:27 +01: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 19.1.0 2019-01-17 10:15:39 +01: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 More pre-commit, more Python 3.7 2018-12-17 07:43:11 +01:00
setup.py Fix project URLs 2018-10-05 17:11:39 +02:00
tox.ini More pre-commit, more Python 3.7 2018-12-17 07:43:11 +01: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.