sha3

package
v0.0.0-...-a6e9625 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeccak256

func NewKeccak256() hash.Hash

NewKeccak256 creates a new Keccak-256 hash.

func ShakeSum128

func ShakeSum128(hash, data []byte)

ShakeSum128 writes an arbitrary-length digest of data into hash.

func ShakeSum256

func ShakeSum256(hash, data []byte)

ShakeSum256 writes an arbitrary-length digest of data into hash.

Types

type ShakeHash

type ShakeHash interface {
	// Write absorbs more data into the hash's state. It panics if input is
	// written to it after output has been read from it.
	io.Writer

	// Read reads more output from the hash; reading affects the hash's
	// state. (ShakeHash.Read is thus very different from Hash.Sum)
	// It never returns an error.
	io.Reader

	// Clone returns a copy of the ShakeHash in its current state.
	Clone() ShakeHash

	// Reset resets the ShakeHash to its initial state.
	Reset()
}

ShakeHash defines the interface to hash functions that support arbitrary-length output.

func NewShake128

func NewShake128() ShakeHash

NewShake128 creates a new SHAKE128 variable-output-length ShakeHash. Its generic security strength is 128 bits against all attacks if at least 32 bytes of its output are used.

func NewShake256

func NewShake256() ShakeHash

NewShake256 creates a new SHAKE128 variable-output-length ShakeHash. Its generic security strength is 256 bits against all attacks if at least 64 bytes of its output are used.

Jump to

Keyboard shortcuts

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