sbox

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Size = 4

The size of an jenkins3 32 bit hash in bytes.

Variables

View Source
var SBoxTable = [256]uint32{}/* 256 elements not displayed */

Functions

func New

func New(seed uint32) nhash.HashF32

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

func Sbox

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

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