hash

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash[T comparable](val T) uint32

Hash returns a 32bit unsigned integer hash for any value passed in.

func HashBytes

func HashBytes(b []byte) uint32

HashBytes returns a 32bit unsigned integer hash of the passed byte slice.

Types

type Hasher

type Hasher interface {
	Hash() uint32
}

Hasher is an interface primarily for structs to provide a hash of their contents.

Jump to

Keyboard shortcuts

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