Skip to main content

Streaming-capable SipHash Implementation

Project description

This modules provides a C-based implementation of SipHash with an interface compatible with the hash functions provided by the hashlib standard library module. Only SipHash24 is currently implemented. For API documentation, see the hashlib documentation and the docstrings of the siphahs24 class and its methods.

This module differs from other similar modules by providing a streaming-capable implementation and an interface compatible to the hash functions provided by the hashlib standard library module and by providing binary wheels for all supported Python releases on the most common platforms. More platforms can be added to the build job as needed.

Following the hashlib interface, the return value of the digest() method is a bytes object. It can be easily converted to an int with minimal overhead:

integer = int.from_bytes(siphash24(b'spam').digest(), 'little')

The SipHash implementation is copied, with minimal modifications to allow compilation with MSCV, from the c-siphash library, in turn based on the reference implementation of SipHash, written by Jean-Philippe Aumasson and Daniel J. Bernstein, and released to the Public Domain. This module is distributed with the same license as the c-siphash library: Apache-2.0 or LGPL-2.1-or-later, see AUTHORS for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

siphash24-1.0.1.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distributions

siphash24-1.0.1-cp311-cp311-win_amd64.whl (68.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

siphash24-1.0.1-cp311-cp311-win32.whl (58.8 kB view hashes)

Uploaded CPython 3.11 Windows x86

siphash24-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (476.0 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

siphash24-1.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (473.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

siphash24-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl (82.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

siphash24-1.0.1-cp311-cp311-macosx_10_9_universal2.whl (154.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

siphash24-1.0.1-cp310-cp310-win_amd64.whl (68.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

siphash24-1.0.1-cp310-cp310-win32.whl (58.5 kB view hashes)

Uploaded CPython 3.10 Windows x86

siphash24-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (436.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

siphash24-1.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (433.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

siphash24-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl (82.0 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

siphash24-1.0.1-cp310-cp310-macosx_10_9_universal2.whl (153.6 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

siphash24-1.0.1-cp39-cp39-win_amd64.whl (68.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

siphash24-1.0.1-cp39-cp39-win32.whl (59.1 kB view hashes)

Uploaded CPython 3.9 Windows x86

siphash24-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (438.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

siphash24-1.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (435.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

siphash24-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl (82.6 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

siphash24-1.0.1-cp39-cp39-macosx_10_9_universal2.whl (154.6 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

siphash24-1.0.1-cp38-cp38-win_amd64.whl (68.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

siphash24-1.0.1-cp38-cp38-win32.whl (59.0 kB view hashes)

Uploaded CPython 3.8 Windows x86

siphash24-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (445.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

siphash24-1.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (443.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

siphash24-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl (82.5 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

siphash24-1.0.1-cp38-cp38-macosx_10_9_universal2.whl (154.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

siphash24-1.0.1-cp37-cp37m-win_amd64.whl (68.5 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

siphash24-1.0.1-cp37-cp37m-win32.whl (58.4 kB view hashes)

Uploaded CPython 3.7m Windows x86

siphash24-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (412.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

siphash24-1.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (406.6 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

siphash24-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl (82.4 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

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