Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

bozhu/siphash-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

siphash-python

A Python implementation of SipHash.

The source code is under MIT license.

Usage

Import as a class:

>>> from siphash import SipHash
>>> my_hash = SipHash()

Or use specific c and d:

>>> my_hash = SipHash(c=2, d=4)

Use a 128-bit key to authenticate a string:

>>> k = 0x0f0e0d0c0b0a09080706050403020100
>>> m = 'A short message'
>>> t = my_hash.auth(k, m)
>>> hex(t)
'0xae43dfaed1ab1c00L'

About

A Python implementation of SipHash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages