Skip to content

Commit 85d5025

Browse files
committed
add NewHash{32,64}.
Fixes #29
1 parent 8f0be54 commit 85d5025

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

xxhash.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package xxhash
22

3+
import "hash"
4+
35
const (
46
prime32x1 uint32 = 2654435761
57
prime32x2 uint32 = 2246822519
@@ -22,6 +24,9 @@ const (
2224
zero64x4 = 0x61c8864e7a143579
2325
)
2426

27+
func NewHash32() hash.Hash { return New32() }
28+
func NewHash64() hash.Hash { return New64() }
29+
2530
// Checksum32 returns the checksum of the input data with the seed set to 0.
2631
func Checksum32(in []byte) uint32 {
2732
return Checksum32S(in, 0)

0 commit comments

Comments
 (0)