murmur32.gno
0.66 Kb · 20 lines
1// Package murmur3 implements the MurmurHash3 hash algorithm.
2//
3// Package implements Austin Appleby's MurmurHash3 algorithm.
4//
5// MurmurHash3 is a fast, non-cryptographic hash function well suited for hash
6// tables, bloom filters, data partitioning, and deduplication where speed and
7// good distribution matter more than cryptographic security.
8//
9// References:
10//
11// https://en.wikipedia.org/wiki/MurmurHash#Algorithm
12// https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp
13package murmur3
14
15import "strconv"
16
17// EncodeToString returns the hexadecimal encoding of a hash value.
18func EncodeToString(sum uint64) string {
19 return strconv.FormatUint(sum, 16)
20}