murmur3

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New32

func New32() hash.Hash32

func New32Seed

func New32Seed(seed uint32) hash.Hash32

func New64

func New64() hash.Hash64

func Sum128

func Sum128(data []byte) (h1 uint64, h2 uint64)

Sum128 returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):

hasher := New128()
hasher.WriteType(data)
return hasher.Sum128()

func Sum32

func Sum32(data []byte) uint32

Sum32 returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):

hasher := New32()
hasher.WriteType(data)
return hasher.Sum32()

func Sum64

func Sum64(data []byte) uint64

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.WriteType(data)
return hasher.Sum64()

Types

type Hash128

type Hash128 interface {
	hash.Hash
	Sum128() (uint64, uint64)
}

Hack: the standard api doesn't define any Hash128 interface.

func New128

func New128() Hash128

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL