Skip to main content

A CFFI-based implementation of SipHash24

Project description

# python-csiphash24

SipHash-2-4 implementation, CFFI-wrapped for Python.

It just works. If you have Python ≥ 3.6.

Inspired by https://github.com/majek/csiphash and https://github.com/zacharyvoase/python-csiphash.

## How to install

`console $ pip install csiphash24 `

## How to use

`python >>> from binascii import hexlify >>> from csiphash24 import siphash24 >>> hexlify(siphash24(b'0123456789abcdef', b'hello')) b'95a3a242a9dd85d1' `

## Is it fast ?

On my late-2016 MacBook Pro, hashing a 256-bytes message takes less than a microsecond on average (about 780 nanoseconds to be precise).

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

csiphash24-1.0.0.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

csiphash24-1.0.0-cp36-cp36m-macosx_10_6_intel.whl (7.3 kB view hashes)

Uploaded CPython 3.6m macOS 10.6+ intel

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