aeshash

package
v0.0.0-...-1a9adb5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package aeshash implements hashing functions derived from the Go runtime's internal hashing based on the support of AES encryption in CPU instructions.

On architecture where the CPU does not provide instructions for AES encryption, the aeshash.Enabled function always returns false, and attempting to call any other function will trigger a panic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

Enabled returns true if AES hash is available on the system.

The function uses the same logic than the Go runtime since we depend on the AES hash state being initialized.

See https://go.dev/src/runtime/alg.go

func Hash128

func Hash128(value [16]byte, seed uintptr) uintptr

func Hash32

func Hash32(value uint32, seed uintptr) uintptr

func Hash64

func Hash64(value uint64, seed uintptr) uintptr

func MultiHash128

func MultiHash128(hashes []uintptr, values [][16]byte, seed uintptr)

func MultiHash32

func MultiHash32(hashes []uintptr, values []uint32, seed uintptr)

func MultiHash64

func MultiHash64(hashes []uintptr, values []uint64, seed uintptr)

func MultiHashUint128Array

func MultiHashUint128Array(hashes []uintptr, values sparse.Uint128Array, seed uintptr)

func MultiHashUint32Array

func MultiHashUint32Array(hashes []uintptr, values sparse.Uint32Array, seed uintptr)

func MultiHashUint64Array

func MultiHashUint64Array(hashes []uintptr, values sparse.Uint64Array, seed uintptr)

Types

This section is empty.

Jump to

Keyboard shortcuts

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