aboutsummaryrefslogtreecommitdiff
path: root/weed/util/randomizer.go
blob: e5ccd3fb325d927ae20bc680ba8dd51bd98aa0fd (plain)
1
2
3
4
5
6
7
8
9
package util

import "hash/fnv"

func HashBytesToInt64(x []byte) int64 {
	hash := fnv.New64()
	hash.Write(x)
	return int64(hash.Sum64())
}