7
// Make sure interfaces are correctly implemented.
9
_ hash.Hash = new(digest64)
10
_ hash.Hash64 = new(digest64)
11
_ bmixer = new(digest64)
14
// digest64 is half a digest128.
15
type digest64 digest128
17
func New64() hash.Hash64 {
18
d := (*digest64)(New128().(*digest128))
22
func (d *digest64) Sum(b []byte) []byte {
25
byte(h1>>56), byte(h1>>48), byte(h1>>40), byte(h1>>32),
26
byte(h1>>24), byte(h1>>16), byte(h1>>8), byte(h1))
29
func (d *digest64) Sum64() uint64 {
30
h1, _ := (*digest128)(d).Sum128()
34
// Sum64 returns the MurmurHash3 sum of data. It is equivalent to the
35
// following sequence (without the extra burden and the extra allocation):
38
// return hasher.Sum64()
39
func Sum64(data []byte) uint64 {
40
d := &digest128{h1: 1, h2: 1}