hash

package
v0.0.0-...-438179e Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package hash provides the hashing functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombineHashes

func CombineHashes(hash1, hash2 uint32) uint32

CombineHashes combines two hashes and return a new one

func Of

func Of(in []byte) uint32

Types

type IHashable

type IHashable interface {
	// Returns a 32 bit hash of the the entity which implements it.
	// The hash should be constant to the life time of the implementor.
	Hash() uint32
}

IHashable is the interface types which allows expressions to have a hash value that doesn't change through out their life time. The origin of each expression can be checked by comparing their hashes. Basically two expressions with the same hash consider to be the same.

Jump to

Keyboard shortcuts

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