Go to file
2021-08-29 17:55:52 +02:00
.github Update branch name 2021-08-29 17:40:21 +02:00
docs Fix links 2021-08-29 17:52:34 +02:00
extras Drop Python 2 (#98) 2021-08-29 17:34:22 +02:00
src/argon2 Prepare 21.1.0 2021-08-29 17:55:52 +02:00
tests Drop Python 2 (#98) 2021-08-29 17:34:22 +02:00
.gitignore Consistently use canonical name 2019-06-05 12:37:58 +02:00
.gitmodules Move libargon2 into extras dir too 2015-12-11 14:06:04 +01:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#97) 2021-08-02 20:04:48 +02:00
.readthedocs.yml Move to GitHub Actions (#58) 2020-03-30 16:27:59 +02:00
AUTHORS.rst Fix links 2021-08-29 17:52:34 +02:00
CHANGELOG.rst Prepare 21.1.0 2021-08-29 17:55:52 +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 Add AP wheel builder 2019-10-19 12:25:10 +02:00
pyproject.toml Drop Python 2 (#98) 2021-08-29 17:34:22 +02:00
README.rst Fix links 2021-08-29 17:52:34 +02:00
SECURITY.md fix typo 2021-05-09 07:20:24 +02:00
setup.py Drop Python 2 (#98) 2021-08-29 17:34:22 +02:00
tox.ini Drop Python 2 (#98) 2021-08-29 17:34:22 +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.

=================
Argon2 for Python
=================

.. image:: https://img.shields.io/badge/Docs-Read%20The%20Docs-black
   :target: https://argon2-cffi.readthedocs.io/
   :alt: Documentation

.. image:: https://img.shields.io/badge/license-MIT-C06524
   :target: https://github.com/hynek/argon2-cffi/blob/main/LICENSE
   :alt: License: MIT

.. image:: https://img.shields.io/pypi/v/argon2-cffi
   :target: https://pypi.org/project/argon2-cffi/
   :alt: PyPI version

.. image:: https://static.pepy.tech/personalized-badge/argon2-cffi?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Downloads%20/%20Month
   :target: https://pepy.tech/project/argon2-cffi
   :alt: Downloads / Month


.. teaser-begin

`Argon2 <https://github.com/p-h-c/phc-winner-argon2>`_ won the `Password Hashing Competition <https://www.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


*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 3.5+, and PyPy3.

It implements *Argon2* version 1.3, as described in
`Argon2: the memory-hard function for password hashing and other applications <https://www.cryptolux.org/images/0/0d/Argon2.pdf>`_.


argon2-cffi for Enterprise
==========================

Available as part of the Tidelift Subscription.

The maintainers of *argon2-cffi* and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. `Learn more. <https://tidelift.com/subscription/pkg/pypi-argon2-cffi?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`_