hash

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

This package defines a non-cryptographically secure hash type that is aimed towards being used for applications like hash maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash uint64

func (Hash) Combine

func (h Hash) Combine(hashes ...Hash) Hash

Combines the supplied hashes with the hash that called the method in an order dependent fassion, meaning the same values sent in a different order are likely to produce a different hash. The hash that called the method will always be the zero-th value, meaning it will be the starting hash value before any combining operations are performed. After the first value the hashes will be combined in the order they are given.

func (Hash) CombineIgnoreZero

func (h Hash) CombineIgnoreZero(hashes ...Hash) Hash

Operates the same a Hash.Combine except zero hash values will be skipped when calculating hash values.

func (Hash) CombineUnordered

func (h Hash) CombineUnordered(hashes ...Hash) Hash

Combines the supplied hashes with the hash that called the method in an order independent fassion, meaning the same values sent in a different order will produce the same hash. The hash that called the method will always be the zero-th value, meaning it will be the starting hash value before any cobining operations are performed.

func (Hash) CombineUnorderedIgnoreZero

func (h Hash) CombineUnorderedIgnoreZero(hashes ...Hash) Hash

Operates the same a Hash.CombineUnorderedIgnoreZero except zero hash values will be skipped when calculating hash values.

Jump to

Keyboard shortcuts

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