siphashc
Python module (in c) for siphash-2-4
What it is and what it does
siphashc is a Python C extension that implements SipHash-2-4, a fast and secure pseudorandom function designed for hashing short inputs. It wraps a C implementation based on the original SipHash specification, providing a simple interface to compute hash values from a key and message. The module has no runtime dependencies and is distributed as precompiled wheels for modern Python versions and common platforms, making installation straightforward on Linux, macOS, and Windows.
The package is maintained by the Weblate project and is used in production localization workflows. It is suitable for applications that need a lightweight, collision-resistant hash function—such as hash tables, checksums, or authentication tags—where the speed and security properties of SipHash-2-4 are appropriate. The ISC license permits unrestricted use in open-source and proprietary projects.
Use it for:
- Hash table implementation where collision resistance and speed are both important.
- Generating message authentication codes or checksums for data integrity verification.
- Fingerprinting or deduplication of short strings in localization or content management systems.
- Cryptographic applications requiring a PRF with known security properties and performance.
- Replacing weak hash functions in legacy code where SipHash-2-4's guarantees are needed.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
siphashc provides a Python binding to the SipHash-2-4 cryptographic hash function, implemented as a C extension for performance.
Yes, if you need SipHash-2-4 specifically and want a C-based implementation for performance. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and carries a permissive license. Install friction is moderate due to the compiled extension, but prebuilt wheels are available for standard platforms. If you are unsure whether SipHash-2-4 is the right choice for your use case, verify its security and performance properties against your requirements first.
Install
siphashc on PyPI
pip
pip install siphashcuv
uv add siphashcpoetry
poetry add siphashcInstalling siphashc
Before you install
Medium install friction due to compiled C extension wheels; however, prebuilt wheels are available for common platforms (macOS x86_64 and ARM, Linux x86_64 and aarch64, Windows x86_64) and Python versions 3.10–3.15. Last release was 6 days ago and repository is actively maintained.
License in practice
Released under the ISC license, a permissive open-source license that allows commercial and private use with minimal restrictions, making it safe for most projects.
Quickstart
pip install siphashc
from siphashc import siphash
result = siphash("sixteencharstrng", "i need a hash of this")
print(result) # 10796923698683394048
Requires Python 3.10 or later; a C compiler is needed only if building from source rather than using prebuilt wheels.
Verify before relying
- Whether SipHash-2-4 is suitable for your specific security or performance requirements compared to other hash functions.
- Performance characteristics and benchmarks against pure-Python or alternative hash implementations.
- Whether the 20-star repository and small user base indicate sufficient community scrutiny for cryptographic use.
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,767/month — #11,576 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: siphashc-2.8-cp310-abi3-macosx_10_9_x86_64.whl; siphashc-2.8-cp310-abi3-macosx_11_0_arm64.whl; siphashc-2.8-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; siphashc-2.8-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; siphashc-2.8-cp310-abi3-win_amd64.whl; siphashc-2.8-cp314-cp314t-macosx_10_15_x86_64.whl; siphashc-2.8-cp314-cp314t-macosx_11_0_arm64.whl; siphashc-2.8-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; siphashc-2.8-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; siphashc-2.8-cp314-cp314t-win_amd64.whl; siphashc-2.8-cp315-cp315t-macosx_10_15_x86_64.whl; siphashc-2.8-cp315-cp315t-macosx_11_0_arm64.whl; siphashc-2.8-cp315-cp315t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; siphashc-2.8-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; siphashc-2.8-cp315-cp315t-win_amd64.whl
Keywords: siphash, siphash-2-4
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI
siphash24Provides a C-based SipHash-1-3 and SipHash-2-4…
unclear · top 15,000 on PyPI
murmurhashProvides fast MurmurHash2 hashing through…
permissive · top 1,000 on PyPI
fnv-hash-fastComputes FNV-1a 32-bit hashes using a C++…
permissive · top 15,000 on PyPI
clickhouse-cityhashProvides Python bindings to CityHash, a fast…
permissive · top 15,000 on PyPI
blake3Python bindings for the BLAKE3 cryptographic…
permissive · top 5,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI
fnvhashComputes FNV hash values in pure Python,…
permissive · top 5,000 on PyPI
poseidon-pyPoseidon hash implementation in Python with a…
unclear · top 15,000 on PyPI
pyfarmhashProvides Python bindings to Google's FarmHash,…
permissive · top 15,000 on PyPI