Argon2 for Python
Argon2 won the Password Hashing Competition and argon2-cffi is the simplest way to use it in Python and PyPy:
>>> from argon2 import PasswordHasher
>>> ph = PasswordHasher()
>>> hash = ph.hash("correct horse battery staple")
>>> hash # doctest: +SKIP
'$argon2id$v=19$m=65536,t=3,p=4$MIIRqgvgQbgj220jfp0MPA$YfwJSVjtjSU0zzV/P3S9nnQ/USre2wvJMjfCIjrTQbg'
>>> ph.verify(hash, "correct horse battery staple")
True
>>> ph.check_needs_rehash(hash)
False
>>> ph.verify(hash, "Tr0ub4dor&3")
Traceback (most recent call last):
...
argon2.exceptions.VerifyMismatchError: The password does not match the supplied hash
Project Information
argon2-cffi is available from PyPI, the documentation lives at Read the Docs, the code on GitHub. The low-level Argon2 CFFI bindings are maintained in the separate project argon2-cffi-bindings.
It targets Python 3.6 and newer, and PyPy3. The last version that works with Python 2.7 is 20.1.0, and the last version that works with Python 3.5 is 21.1.0.
argon2-cffi implements Argon2 version 1.3, as described in Argon2: the memory-hard function for password hashing and other applications.
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.
Metadata
Release files for argon2-cffi 21.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| argon2-cffi-21.3.0.tar.gz | 38.4 kB | Without provenance | Details for argon2-cffi-21.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| argon2_cffi-21.3.0-py3-none-any.whl | Python 3 | none | any | Details for argon2_cffi-21.3.0-py3-none-any.whl |
Total release size: 52.9 kB
Release files / argon2-cffi-21.3.0.tar.gz
| Download URL | argon2-cffi-21.3.0.tar.gz |
|---|---|
| Size | 38.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b
|
|
BLAKE2b-256 checksum How to use checksums |
3f1820bb5b6bf55e55d14558b57afc3d4476349ab90e0c43e60f27a7c2187289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / argon2_cffi-21.3.0-py3-none-any.whl
| Download URL | argon2_cffi-21.3.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c976986f2c5c0e5000919e6de187906cfd81fb1c72bf9d88c01177e77da7f80
|
|
BLAKE2b-256 checksum How to use checksums |
a807946d5a9431bae05a776a59746ec385fbb79b526738d25e4202d3e0bbf7f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Security for argon2-cffi 21.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.