Argon2 for Python
Project description
argon2-cffi: Argon2 for Python
Argon2 won the Password Hashing Competition and argon2-cffi is the simplest way to use it in Python:
>>> 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 Links
- PyPI
- GitHub
- Documentation
- Changelog
- Funding
- The low-level Argon2 CFFI bindings are maintained in the separate argon2-cffi-bindings project.
Release Information
Added
- Official support for Python 3.13 and 3.14. No code changes were necessary.
Removed
- Python 3.7 is not supported anymore. #186
Changed
-
argon2.PasswordHasher.check_needs_rehash()
now also accepts bytes like the rest of the API. #174 -
Improved parameter compatibility handling for Pyodide / WebAssembly environments. #190
Credits
argon2-cffi is maintained by Hynek Schlawack.
The development is kindly supported by my employer Variomedia AG, argon2-cffi Tidelift subscribers, and my amazing GitHub Sponsors.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file argon2_cffi-25.1.0.tar.gz
.
File metadata
- Download URL: argon2_cffi-25.1.0.tar.gz
- Upload date:
- Size: 45.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
694ae5cc8a42f4c4e2bf2ca0e64e51e23a040c6a517a85074683d3959e1346c1
|
|
MD5 |
fbf9e4302b32894a857a12ff0bf7c5f0
|
|
BLAKE2b-256 |
0e89ce5af8a7d472a67cc819d5d998aa8c82c5d860608c4db9f46f1162d7dab9
|
Provenance
The following attestation bundles were made for argon2_cffi-25.1.0.tar.gz
:
Publisher:
pypi-package.yml
on hynek/argon2-cffi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
argon2_cffi-25.1.0.tar.gz
-
Subject digest:
694ae5cc8a42f4c4e2bf2ca0e64e51e23a040c6a517a85074683d3959e1346c1
- Sigstore transparency entry: 228228702
- Sigstore integration time:
-
Permalink:
hynek/argon2-cffi@1fcae4fc1b7ff192b5ade54f6616771e5cf5f391
-
Branch / Tag:
refs/tags/25.1.0
- Owner: https://github.com/hynek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
pypi-package.yml@1fcae4fc1b7ff192b5ade54f6616771e5cf5f391
-
Trigger Event:
release
-
Statement type:
File details
Details for the file argon2_cffi-25.1.0-py3-none-any.whl
.
File metadata
- Download URL: argon2_cffi-25.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fdc8b074db390fccb6eb4a3604ae7231f219aa669a2652e0f20e16ba513d5741
|
|
MD5 |
7e1606a260c68e20c085d53c1bfa8962
|
|
BLAKE2b-256 |
4fd3a8b22fa575b297cd6e3e3b0155c7e25db170edf1c74783d6a31a2490b8d9
|
Provenance
The following attestation bundles were made for argon2_cffi-25.1.0-py3-none-any.whl
:
Publisher:
pypi-package.yml
on hynek/argon2-cffi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
argon2_cffi-25.1.0-py3-none-any.whl
-
Subject digest:
fdc8b074db390fccb6eb4a3604ae7231f219aa669a2652e0f20e16ba513d5741
- Sigstore transparency entry: 228228709
- Sigstore integration time:
-
Permalink:
hynek/argon2-cffi@1fcae4fc1b7ff192b5ade54f6616771e5cf5f391
-
Branch / Tag:
refs/tags/25.1.0
- Owner: https://github.com/hynek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
pypi-package.yml@1fcae4fc1b7ff192b5ade54f6616771e5cf5f391
-
Trigger Event:
release
-
Statement type: