• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H17-Jan-2019-263167

docs/H17-Jan-2019-948517

extras/H17-Jan-2019-92,13188,846

src/H17-Jan-2019-1,3081,007

tests/H03-May-2022-764604

.coveragercH A D17-Mar-2018212 1512

.pre-commit-config.yamlH A D17-Jan-2019724 2826

AUTHORS.rstH A D06-Jan-20183.1 KiB6242

CHANGELOG.rstH A D17-Jan-20197.2 KiB240139

FAQ.rstH A D07-Jul-20181.2 KiB1914

LICENSEH A D06-Dec-20151.1 KiB2217

MANIFEST.inH A D07-Jul-2018300 98

PKG-INFOH A D17-Jan-20198.8 KiB190140

README.rstH A D19-Aug-20182.4 KiB5944

pyproject.tomlH A D23-Jun-201830 32

setup.cfgH A D17-Jan-2019495 3327

setup.pyH A D05-Oct-201811.4 KiB362287

tox.iniH A D17-Dec-20181.7 KiB7257

README.rst

1=====================================
2CFFI-based Argon2 Bindings for Python
3=====================================
4
5.. image:: https://img.shields.io/pypi/v/argon2_cffi.svg
6   :target: https://pypi.org/project/argon2_cffi/
7   :alt: PyPI
8
9.. image:: https://readthedocs.org/projects/argon2-cffi/badge/?version=stable
10   :target: http://argon2-cffi.readthedocs.io/en/stable/?badge=stable
11   :alt: Documentation Status
12
13.. image:: https://travis-ci.org/hynek/argon2_cffi.svg?branch=master
14   :target: https://travis-ci.org/hynek/argon2_cffi
15   :alt: Travis CI status
16
17.. image:: https://ci.appveyor.com/api/projects/status/3faufu7qgwc8nv2v/branch/master?svg=true
18   :target: https://ci.appveyor.com/project/hynek/argon2-cffi
19   :alt: AppVeyor CI Status
20
21.. image:: https://codecov.io/github/hynek/argon2_cffi/branch/master/graph/badge.svg
22   :target: https://codecov.io/github/hynek/argon2_cffi
23   :alt: Test Coverage
24
25.. image:: https://www.irccloud.com/invite-svg?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1
26   :target: https://www.irccloud.com/invite?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1
27   :alt: IRC
28
29.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
30   :target: https://github.com/ambv/black
31   :alt: Code style: black
32
33.. teaser-begin
34
35`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:
36
37.. code-block:: pycon
38
39  >>> from argon2 import PasswordHasher
40  >>> ph = PasswordHasher()
41  >>> hash = ph.hash("s3kr3tp4ssw0rd")
42  >>> hash  # doctest: +SKIP
43  '$argon2id$v=19$m=102400,t=2,p=8$tSm+JOWigOgPZx/g44K5fQ$WDyus6py50bVFIPkjA28lQ'
44  >>> ph.verify(hash, "s3kr3tp4ssw0rd")
45  True
46  >>> ph.check_needs_rehash(hash)
47  False
48  >>> ph.verify(hash, "t0t411ywr0ng")
49  Traceback (most recent call last):
50    ...
51  argon2.exceptions.VerifyMismatchError: The password does not match the supplied hash
52
53
54.. note::
55   `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.
56
57``argon2_cffi``\ ’s documentation lives at `Read the Docs <https://argon2-cffi.readthedocs.io/>`_, the code on `GitHub <https://github.com/hynek/argon2_cffi>`_.
58It’s rigorously tested on Python 2.7, 3.4+, and PyPy.
59