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 hashes)
Built Distribution
Close
Hashes for csiphash24-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c3a3844a6e473b5c69486feb9ce5b4adba812d7e555632ab9d0d7b19a77f66 |
|
MD5 | 72b4aea39fd1f7b8f6d41b7b5a6a57cc |
|
BLAKE2b-256 | 6440f655fdb25338d0134417b49fe7887d525cd62268bc2e7dc7ea62e51bba3a |