Package siphash implements SipHash-2-4, a fast short-input PRF created by Jean-Philippe Aumasson and Daniel J. Bernstein.
const ( // BlockSize is the block size of hash algorithm in bytes. BlockSize = 8 // Size is the size of hash output in bytes. Size = 8 // Size128 is the size of 128-bit hash output in bytes. Size128 = 16 )
Hash returns the 64-bit SipHash-2-4 of the given byte slice with two 64-bit parts of 128-bit key: k0 and k1.
Hash128 returns the 128-bit SipHash-2-4 of the given byte slice with two 64-bit parts of 128-bit key: k0 and k1.
New returns a new hash.Hash64 computing SipHash-2-4 with 16-byte key and 8-byte output.
New128 returns a new hash.Hash computing SipHash-2-4 with 16-byte key and 16-byte output.
Note that 16-byte output is considered experimental by SipHash authors at this time.