argon2-cffi-bindings provides low-level CFFI bindings to the official implementation of the Argon2 password hashing algorithm. It is primarily intended to be used as a backend dependency for high-level Python packages like `argon2-cffi`, and is not recommended for direct application password hashing. The library is actively maintained and currently at version 25.1.0, with regular releases aligning with updates to the underlying Argon2 C library and Python ecosystem changes.
pip install argon2-cffi-bindingsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to access the `ffi` and `lib` objects from the private `_argon2_cffi_bindings` module. It emphasizes that this package is for low-level CFFI interaction, and recommends `argon2-cffi` for high-level application password hashing. The example attempts to retrieve the Argon2 C library version directly via the bindings.
Install and use `argon2-cffi` for password hashing: `pip install argon2-cffi`.
Use `from _argon2_cffi_bindings import ffi, lib`.
When installing `argon2-cffi` with `uv` for Python 3.14+: `uv pip install --prerelease=allow argon2-cffi`. Ensure your build environment supports CFFI 2.0.
Set `ARGON2_CFFI_USE_SSE2=1` to force SSE2, or `ARGON2_CFFI_USE_SSE2=0` to disable it, before installation.
Upgrade to Python 3.9 or newer. Ensure your project's `python_requires` aligns with supported versions.
Install the module using pip: 'pip install argon2-cffi-bindings'.
Ensure the wheel file matches your Python version and architecture, or download the correct wheel file for offline installation.
Install the necessary build tools and 'libffi' development package for your operating system.
Ensure all source files are present and accessible, or use a pre-built wheel to avoid building from source.
Ensure `argon2-cffi` is correctly installed, as it automatically pulls in and builds `argon2-cffi-bindings`. It's recommended to update `pip`, `setuptools`, and `cffi` before installation: `python -m pip install -U pip setuptools cffi` followed by `pip install argon2-cffi`. For direct low-level usage (discouraged for most applications), ensure `argon2-cffi-bindings` is installed correctly.