crapwow

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Size = 4

The size of an jenkins3 32 bit hash in bytes.

Variables

This section is empty.

Functions

func CrapWow

func CrapWow(key []byte, seed uint32) uint32

func New

func New(seed uint32) nhash.HashF32

New returns a new hash.HashF32 interface that computes a 32 bit CrapWow hash.

Types

type State

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

func (*State) BlockSize

func (s *State) BlockSize() int

Return the blocksize of the hash which in this case is 8 bytes.

func (*State) Hash32

func (s *State) Hash32(b []byte, seeds ...uint32) uint32

func (*State) HashSizeInBits

func (s *State) HashSizeInBits() int

retunrs the number of bits the hash function outputs

func (*State) NumSeedBytes

func (s *State) NumSeedBytes() int

Return the maximum number of seed bypes required.

func (*State) Size

func (s *State) Size() int

Return the size of the resulting hash.

Jump to

Keyboard shortcuts

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