Skip to main content

Low-level CFFI bindings for Argon2

Project description

Python CFFI Bindings for Argon2

argon2-cffi-bindings provides low-level CFFI bindings to the Argon2 password hashing algorithm including a vendored version of them.

The currently vendored Argon2 commit ID is f57e61e.

If you want to hash passwords in an application, this package is not for you. Have a look at argon2-cffi with its high-level abstractions!

These bindings have been extracted from argon2-cffi and it remains its main consumer. However, they may be used by other packages that want to use Argon2 library without dealing with C-related complexities.

Usage

The provided CFFI bindings are compiled in API mode. Best effort is given to provide binary wheels for as many platforms as possible.


A copy of Argon2 is vendored and used by default, but can be disabled if argon2-cffi-bindings is installed using:

$ env ARGON2_CFFI_USE_SYSTEM=1 \
  python -m pip install --no-binary=argon2-cffi-bindings argon2-cffi-bindings

Python API

Since this package is intended to be an implementation detail, it uses a private module name. Therefore you have to import the symbols from _argon2_cffi_bindings:

from _argon2_cffi_bindings import ffi, lib

Please refer to cffi documentation on how to use the ffi and lib objects.

The list of symbols that are provided can be found in the _ffi_build.py file.

Project Information

argon2-cffi-bindings is available under the MIT license, available from PyPI, the source code and documentation can be found on GitHub.

argon2-cffi-bindings targets Python 3.6 and later, including PyPy3.

Credits & License

argon2-cffi-bindings is written and maintained by Hynek Schlawack. It is released under the MIT license.

The development is kindly supported by Variomedia AG.

The authors of Argon2 were very helpful to get the library to compile on ancient versions of Visual Studio for ancient versions of Python.

The documentation quotes frequently in verbatim from the Argon2 paper to avoid mistakes by rephrasing.

Vendored Code

The original Argon2 repo can be found at https://github.com/P-H-C/phc-winner-argon2/.

Except for the components listed below, the Argon2 code in this repository is copyright (c) 2015 Daniel Dinu, Dmitry Khovratovich (main authors), Jean-Philippe Aumasson and Samuel Neves, and under CC0 license.

The string encoding routines in src/encoding.c are copyright (c) 2015 Thomas Pornin, and under CC0 license.

The BLAKE2 code in src/blake2/ is copyright (c) Samuel Neves, 2013-2015, and under CC0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argon2-cffi-bindings-21.1.0.tar.gz (1.8 MB view hashes)

Uploaded Source

Built Distributions

argon2_cffi_bindings-21.1.0-pp38-pypy38_pp73-win_amd64.whl (27.8 kB view hashes)

Uploaded PyPy Windows x86-64

argon2_cffi_bindings-21.1.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (29.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

argon2_cffi_bindings-21.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (22.9 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

argon2_cffi_bindings-21.1.0-pp37-pypy37_pp73-win_amd64.whl (27.8 kB view hashes)

Uploaded PyPy Windows x86-64

argon2_cffi_bindings-21.1.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (29.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

argon2_cffi_bindings-21.1.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (22.9 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

argon2_cffi_bindings-21.1.0-cp36-abi3-win_amd64.whl (30.0 kB view hashes)

Uploaded CPython 3.6+ Windows x86-64

argon2_cffi_bindings-21.1.0-cp36-abi3-win32.whl (26.9 kB view hashes)

Uploaded CPython 3.6+ Windows x86

argon2_cffi_bindings-21.1.0-cp36-abi3-musllinux_1_1_x86_64.whl (87.7 kB view hashes)

Uploaded CPython 3.6+ musllinux: musl 1.1+ x86-64

argon2_cffi_bindings-21.1.0-cp36-abi3-musllinux_1_1_i686.whl (83.8 kB view hashes)

Uploaded CPython 3.6+ musllinux: musl 1.1+ i686

argon2_cffi_bindings-21.1.0-cp36-abi3-musllinux_1_1_aarch64.whl (82.8 kB view hashes)

Uploaded CPython 3.6+ musllinux: musl 1.1+ ARM64

argon2_cffi_bindings-21.1.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (85.3 kB view hashes)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ x86-64

argon2_cffi_bindings-21.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (79.7 kB view hashes)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ARM64

argon2_cffi_bindings-21.1.0-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (81.9 kB view hashes)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

argon2_cffi_bindings-21.1.0-cp36-abi3-macosx_10_9_x86_64.whl (28.8 kB view hashes)

Uploaded CPython 3.6+ macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page