Skip to main content
Quarantined

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 hashlib with a clean API and BLAKE2b support.

*Only colorama for pretty terminal output on non-Linux platforms.

PyPI Python License: MIT

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

fast_hashes-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file fast_hashes-0.1.0.tar.gz.

File metadata

  • Download URL: fast_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

Hashes for fast_hashes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc7395773734883b3e79e6d2631a666fd89f9116dc9d086beb21e155bd315cec
MD5 4995e1c8753ee2527769e116b5e336ec
BLAKE2b-256 bfa7c40dbc7c0645414e68d9d2000db5271a18f43afee00d0734d039f38c163b

See more details on using hashes here.

Supported by

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