pearson

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PearsonHasher

type PearsonHasher struct{}

PearsonHasher implements the Hasher interface and computes a 8 bit hash function. Handy for testing hash tree implementations.

func NewPearsonHasher

func NewPearsonHasher() PearsonHasher

func (PearsonHasher) Do

func (h PearsonHasher) Do(data ...[]byte) []byte

Do function hashes input data using the Pearson hash function.

func (PearsonHasher) Len

func (h PearsonHasher) Len() uint16

Len function returns the size of the resulting hash.

func (PearsonHasher) Pearson16

func (h PearsonHasher) Pearson16(x []byte) []byte

implementation to generate 64-bit (16 hex chars) hash

func (PearsonHasher) Pearson8

func (h PearsonHasher) Pearson8(x []byte) byte

implementation to generate a (pseudo) 8-bit output

func (PearsonHasher) Salted

func (h PearsonHasher) Salted(salt []byte, data []byte) []byte

Salted function adds a seed to the input data before hashing it.

Jump to

Keyboard shortcuts

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