keyhash

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 0 Imported by: 0

README

# Koonin's keyhash algorithm

Implementation of Koonin's keyhash 8 bits (one way) and 16 bits (double way) algorithms.

Exceptionally fast, doesn't contain any modulo or division operations. It yields even distribution
of hash values, even in edge cases, when only one byte changes by 1.

This does not fit everywhere, but in certain application areas its characteristics are pretty charming.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get_8bits

func Get_8bits(key []byte, maxSuffixLength int) (hash int)

func Get_16bits

func Get_16bits(key []byte, maxSuffixLength int) (hash int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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