Table of Contents

Class MurmurHash2

Namespace
Typhon.Schema.Definition
Assembly
Typhon.Schema.Definition.dll

MurmurHash2 (32-bit) — a fast non-cryptographic hash used to hash byte/string content, e.g. for value hash codes and index bucketing.

public static class MurmurHash2
Inheritance
MurmurHash2
Inherited Members

Methods

Hash(byte*, int, uint)

Computes the 32-bit MurmurHash2 of length bytes at dataAddr with the given seed.

public static uint Hash(byte* dataAddr, int length, uint seed)

Parameters

dataAddr byte*

Pointer to the first byte to hash.

length int

Number of bytes to hash.

seed uint

Initial hash seed.

Returns

uint

The 32-bit hash, or 0 when length is 0.

Hash(byte[])

Computes the 32-bit MurmurHash2 of data using the fixed default seed.

public static uint Hash(byte[] data)

Parameters

data byte[]

Bytes to hash.

Returns

uint

The 32-bit hash.

Hash(ReadOnlySpan<byte>)

Computes the 32-bit MurmurHash2 of data using the fixed default seed.

public static uint Hash(ReadOnlySpan<byte> data)

Parameters

data ReadOnlySpan<byte>

Bytes to hash.

Returns

uint

The 32-bit hash.