Home | History | Annotate | Download | only in fnv

Lines Matching full:hash

5 // Package fnv implements FNV-1 and FNV-1a, non-cryptographic hash functions
10 // All the hash.Hash implementations returned by this package also
12 // marshal and unmarshal the internal state of the hash.
17 "hash"
40 // New32 returns a new 32-bit FNV-1 hash.Hash.
42 func New32() hash.Hash32 {
47 // New32a returns a new 32-bit FNV-1a hash.Hash.
49 func New32a() hash.Hash32 {
54 // New64 returns a new 64-bit FNV-1 hash.Hash.
56 func New64() hash.Hash64 {
61 // New64a returns a new 64-bit FNV-1a hash.Hash.
63 func New64a() hash.Hash64 {
68 // New128 returns a new 128-bit FNV-1 hash.Hash.
70 func New128() hash.Hash {
77 // New128a returns a new 128-bit FNV-1a hash.Hash.
79 func New128a() hash.Hash {
99 hash := *s
101 hash *= prime32
102 hash ^= sum32(c)
104 *s = hash
109 hash := *s
111 hash ^= sum32a(c)
112 hash *= prime32
114 *s = hash
119 hash := *s
121 hash *= prime64
122 hash ^= sum64(c)
124 *s = hash
129 hash := *s
131 hash ^= sum64a(c)
132 hash *= prime64
134 *s = hash
283 return errors.New("hash/fnv: invalid hash state identifier")
286 return errors.New("hash/fnv: invalid hash state size")
294 return errors.New("hash/fnv: invalid hash state identifier")
297 return errors.New("hash/fnv: invalid hash state size")
305 return errors.New("hash/fnv: invalid hash state identifier")
308 return errors.New("hash/fnv: invalid hash state size")
316 return errors.New("hash/fnv: invalid hash state identifier")
319 return errors.New("hash/fnv: invalid hash state size")
327 return errors.New("hash/fnv: invalid hash state identifier")
330 return errors.New("hash/fnv: invalid hash state size")
339 return errors.New("hash/fnv: invalid hash state identifier")
342 return errors.New("hash/fnv: invalid hash state size")