skillfed

siphashc

Python module (in c) for siphash-2-4

siphashc v2.8 131.8K downloads/30d#11,576 on PyPI20
Permissive license ISC Active released

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 siphashc

uv

uv add siphashc

poetry

poetry add siphashc

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: Software Development :: Libraries :: Python Modules

Tags

siphash hash functioncryptographic hash pythonfast hash algorithmsiphash-2-4 implementationc extension hashpython hash librarycollision-resistant hashing
cryptographyhashingc-extension

More Python Modules packages