hash

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package hash contains Writer interface and SHA3 hasher.

hash.Writer intended to be implemented by records for proper hashing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDHashBytes

func IDHashBytes(b []byte) []byte

IDHashBytes generates hash for record ID from byte slice.

func NewIDHash

func NewIDHash() hash.Hash

NewIDHash returns hash used for records ID generation.

func SHA3Bytes256

func SHA3Bytes256(b []byte) []byte

SHA3Bytes256 generates SHA3-256 hash for byte slice.

func SHA3hash224

func SHA3hash224(hw ...Writer) []byte

SHA3hash224 returns SHA3 hash calculated on data received from Writer.

Types

type Writer

type Writer interface {
	WriteHash(io.Writer)
}

Writer is the interface that wraps the WriteHash method.

WriteHash should write all required for proper hashing data to io.Writer.

Jump to

Keyboard shortcuts

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