From e74c4e6dafdcd1a33e9d116d614a022028767a9e Mon Sep 17 00:00:00 2001 From: Jonny Hopper Date: Mon, 15 Feb 2016 17:17:48 +0000 Subject: [PATCH] Add Sum128WithSeed to match the seed parameter in the reference code --- murmur128.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/murmur128.go b/murmur128.go index d54d136..8c0aa52 100644 --- a/murmur128.go +++ b/murmur128.go @@ -187,3 +187,10 @@ func Sum128(data []byte) (h1 uint64, h2 uint64) { d.clen = len(data) return d.Sum128() } + +func Sum128WithSeed(data []byte, seed uint64) (h1 uint64, h2 uint64) { + d := &digest128{h1: seed, h2: seed} + d.tail = d.bmix(data) + d.clen = len(data) + return d.Sum128() +}