package murmur3

import (
	
)

// Make sure interfaces are correctly implemented.
var (
	_ hash.Hash   = new(digest64)
	_ hash.Hash64 = new(digest64)
	_ bmixer      = new(digest64)
)

// digest64 is half a digest128.
type digest64 digest128

// New64 returns a 64-bit hasher
func () hash.Hash64 { return New64WithSeed(0) }

// New64WithSeed returns a 64-bit hasher set with explicit seed value
func ( uint32) hash.Hash64 {
	 := (*digest64)(New128WithSeed().(*digest128))
	return 
}

func ( *digest64) ( []byte) []byte {
	 := .Sum64()
	return append(,
		byte(>>56), byte(>>48), byte(>>40), byte(>>32),
		byte(>>24), byte(>>16), byte(>>8), byte())
}

func ( *digest64) () uint64 {
	,  := (*digest128)().Sum128()
	return 
}

// Sum64 returns the MurmurHash3 sum of data. It is equivalent to the
// following sequence (without the extra burden and the extra allocation):
//     hasher := New64()
//     hasher.Write(data)
//     return hasher.Sum64()
func ( []byte) uint64 { return Sum64WithSeed(, 0) }

// Sum64WithSeed returns the MurmurHash3 sum of data. It is equivalent to the
// following sequence (without the extra burden and the extra allocation):
//     hasher := New64WithSeed(seed)
//     hasher.Write(data)
//     return hasher.Sum64()
func ( []byte,  uint32) uint64 {
	 := &digest128{h1: uint64(), h2: uint64()}
	.seed = 
	.tail = .bmix()
	.clen = len()
	,  := .Sum128()
	return 
}