keccak

package
v0.0.0-...-8d666af Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keccak256

func Keccak256(dst, src []byte) []byte

Keccak256 hashes a src with keccak-256

func Keccak256Rlp

func Keccak256Rlp(dst []byte, src *fastrlp.Value) []byte

Keccak256Rlp hashes a fastrlp.Value with keccak-256

Types

type Keccak

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

Keccak is the sha256 keccak hash

func NewKeccak256

func NewKeccak256() *Keccak

NewKeccak256 returns a new keccak 256

func (*Keccak) Read

func (k *Keccak) Read() []byte

Read hashes the content and returns the intermediate buffer.

func (*Keccak) Reset

func (k *Keccak) Reset()

Reset implements the hash interface

func (*Keccak) Sum

func (k *Keccak) Sum(dst []byte) []byte

Sum implements the hash interface

func (*Keccak) Write

func (k *Keccak) Write(b []byte) (int, error)

Write implements the hash interface

func (*Keccak) WriteRlp

func (k *Keccak) WriteRlp(dst []byte, v *fastrlp.Value) []byte

WriteRlp writes an RLP value

type Pool

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

Pool is a pool of keccaks

var DefaultKeccakPool Pool

DefaultKeccakPool is a default pool

func (*Pool) Get

func (p *Pool) Get() *Keccak

Get returns the keccak

func (*Pool) Put

func (p *Pool) Put(k *Keccak)

Put releases the keccak

Jump to

Keyboard shortcuts

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