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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7518b4b85cba47eb6fe839c218ad5526dbd6b419fcc9d4e2194abf8112af897b
|
|
| MD5 |
6fa1d37a90f4f7e870ff3c8c8d369eb9
|
|
| BLAKE2b-256 |
e98357219f4ddb1b05a37ddefdfc2cc8485228d2192e538212fb98c073ff900b
|
File details
Details for the file csiphash24-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl.
File metadata
- Download URL: csiphash24-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.4 kB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55c3a3844a6e473b5c69486feb9ce5b4adba812d7e555632ab9d0d7b19a77f66
|
|
| MD5 |
72b4aea39fd1f7b8f6d41b7b5a6a57cc
|
|
| BLAKE2b-256 |
6440f655fdb25338d0134417b49fe7887d525cd62268bc2e7dc7ea62e51bba3a
|