This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.
fast-hashes
Lightweight, zero-dependency* hashing utilities for Python — wrapping
hashlibwith a clean API and BLAKE2b support.
*Only colorama for pretty terminal output on non-Linux platforms.
Installation
pip install fast-hashes
Note: Native optimized bindings are available on Linux only (Ubuntu 20.04+, Debian 11+, Fedora 38+). On other platforms the library falls back to pure-Python hashlib wrappers.
Quick Start
from fast_hashes import sha256, md5, blake2
# String input
print(sha256("hello world"))
# → b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
# Bytes input
print(md5(b"binary data"))
# → 4c3c7c067634daec9716a80ea886d734
# BLAKE2b with custom digest size
print(blake2("fast!", digest_size=16))
# → 32-char hex string
API Reference
| Function | Description | Returns |
|---|---|---|
md5(data) |
MD5 hex digest | str |
sha1(data) |
SHA-1 hex digest | str |
sha256(data) |
SHA-256 hex digest | str |
sha512(data) |
SHA-512 hex digest | str |
blake2(data, digest_size=32) |
BLAKE2b hex digest | str |
All functions accept str or bytes. Strings are automatically UTF-8 encoded.
Supported Platforms
| Platform | Status |
|---|---|
| Ubuntu 20.04+ | ✅ Full support (native bindings) |
| Debian 11+ | ✅ Full support (native bindings) |
| Fedora 38+ | ✅ Full support (native bindings) |
| Arch Linux | ✅ Full support (native bindings) |
| macOS | ⚠️ Fallback (pure Python) |
| Windows | ⚠️ Fallback (pure Python) |
Benchmarks
Compared to raw hashlib calls, fast-hashes adds negligible overhead (~2μs per call) while providing:
- Automatic string-to-bytes encoding
- Consistent hex output
- BLAKE2b with configurable digest size
- Platform compatibility checks
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file speed_hashes-0.1.0.tar.gz.
File metadata
- Download URL: speed_hashes-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3f624d29e661916d1664302f3f09882faba0de5451bf1ed68fd225d73575e58
|
|
| MD5 |
9ffb07bbf3b35e00c2afe3f08a4f9c0d
|
|
| BLAKE2b-256 |
69fa2d1f1ba04f8115d1e4e8388fee34bd44ed983b4b19575a9213e089575e3f
|