README
¶
uhash
Go programming helpers for common hashing needs.
Also implements a selection of the hashing algorithms described at: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
Usage
func Fnv1
func Fnv1(vals []int) (h int)
Fowler/Noll/Vo '1'
func Fnv1a
func Fnv1a(vals []int) (h int)
Fowler/Noll/Vo '1a'
func ModifiedBernstein
func ModifiedBernstein(vals []int) (h int)
A minor update to Bernstein's hash replaces addition with XOR for the combining step.
func OneAtATime
func OneAtATime(vals []int) (h int)
Bob Jenkins
func RotatingAdd
func RotatingAdd(vals []int) (h int)
The rotating hash with SUM
func RotatingXor
func RotatingXor(vals []int) (h int)
The rotating hash with XOR
func WriteAndSum
func WriteAndSum(h hash.Hash, data, b []byte) (sum []byte, err error)
Convenience short-hand for h.Write(data)
, then h.Sum(b)
.
Documentation
¶
Overview ¶
Go programming helpers for common hashing needs.
Also implements a selection of the hashing algorithms described at: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModifiedBernstein ¶
A minor update to Bernstein's hash replaces addition with XOR for the combining step.
Types ¶
This section is empty.