Skip to main content

A blazingly fast, portable hash function with proven statistical guarantees

Project description

SeaHash

CI PyPI PyPI - Python Version PyPI - Wheel PyPI - Status PyPI - License

Python bindings to seahash - A blazingly fast, portable hash function with proven statistical guarantees.

Installation

pip install seahash

Wheels should be available for most platforms. If you need a wheel which isn't provided, raise an issue.

Compiling from source will require a Rust toolchain.

Usage

Hashing can be done in 2 ways:

Primitive functions

import seahash

# Plain hash
seahash.hash(b"123")

# Hash with custom seeds
seahash.hash_seeded(b"123", 4, 5, 6, 7)

Both methods return an int.

hashlib-compatible class

For convenience, a hashlib-compatible class is provided:

import seahash

s = seahash.SeaHash()

s.update(b"123")

s.digest()
s.hexdigest()

The underlying int digest can be obtained with intdigest.

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

seahash-0.2.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distributions

seahash-0.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp310-none-win_amd64.whl (129.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

seahash-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (469.1 kB view hashes)

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

seahash-0.2.0-cp39-none-win_amd64.whl (129.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

seahash-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (470.3 kB view hashes)

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

seahash-0.2.0-cp38-none-win_amd64.whl (129.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

seahash-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

seahash-0.2.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (469.7 kB view hashes)

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

seahash-0.2.0-cp37-none-win_amd64.whl (129.1 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

seahash-0.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB view hashes)

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

seahash-0.2.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (469.8 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

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