hashx

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package hashx provides simple hashing functions for various input types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(b []byte) uint64

Bytes returns the hash value of the given byte sequence.

func Int

func Int[I constraints.Integer](i I) uint64

Int returns the hash value of the given integer.

func IntHashx

func IntHashx[I constraints.Integer](h *Hashx, i I) uint64

IntHashx returns the hash value of the given integer, using the given Hashx instance.

func String

func String(s string) uint64

String returns the hash value of the given string.

Types

type Hashx

type Hashx struct {
	// contains filtered or unexported fields
}

Hashx calculates hash values for various input types.

func New

func New() *Hashx

New returns a new Hashx.

func NewSeed

func NewSeed(seed uint32) *Hashx

NewSeed returns a new Hashx with the given seed.

func (*Hashx) Bytes

func (h *Hashx) Bytes(b []byte) uint64

Bytes returns the hash value of the given byte sequence.

func (*Hashx) String

func (h *Hashx) String(s string) uint64

String returns the hash value of the given string.

Jump to

Keyboard shortcuts

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