keccak

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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