hashAddByte adds a byte to a fnv64a hash value, returning the updated hash.
(h uint64, b byte)
| 40 | |
| 41 | // hashAddByte adds a byte to a fnv64a hash value, returning the updated hash. |
| 42 | func hashAddByte(h uint64, b byte) uint64 { |
| 43 | h ^= uint64(b) |
| 44 | h *= prime64 |
| 45 | return h |
| 46 | } |
| 47 | |
| 48 | // HashNew32 initializies a new fnv32 hash value. |
| 49 | func HashNew32() uint32 { |