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

$ pip install csiphash24

How to use

>>> 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.4.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csiphash24-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl (4.4 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

Details for the file csiphash24-1.0.4.tar.gz.

File metadata

  • Download URL: csiphash24-1.0.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for csiphash24-1.0.4.tar.gz
Algorithm Hash digest
SHA256 7518b4b85cba47eb6fe839c218ad5526dbd6b419fcc9d4e2194abf8112af897b
MD5 6fa1d37a90f4f7e870ff3c8c8d369eb9
BLAKE2b-256 e98357219f4ddb1b05a37ddefdfc2cc8485228d2192e538212fb98c073ff900b

See more details on using hashes here.

File details

Details for the file csiphash24-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for csiphash24-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 55c3a3844a6e473b5c69486feb9ce5b4adba812d7e555632ab9d0d7b19a77f66
MD5 72b4aea39fd1f7b8f6d41b7b5a6a57cc
BLAKE2b-256 6440f655fdb25338d0134417b49fe7887d525cd62268bc2e7dc7ea62e51bba3a

See more details on using hashes here.

Supported by

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