poseidon

package
v0.0.0-...-6972718 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashPoseidon

type HashPoseidon[E poseidon.Element[E]] struct {
}

HashPoseidon implements the HashFunction interface for the Poseidon hash

func (HashPoseidon[E]) Hash

func (f HashPoseidon[E]) Hash(b ...[]byte) ([]byte, error)

Hash implements the hash method for the HashFunction HashPoseidon. It expects the byte arrays to be little-endian representations of big.Int values.

func (HashPoseidon[E]) Len

func (HashPoseidon[E]) Len() int

Len returns the length of the Hash output

func (HashPoseidon[E]) Type

func (HashPoseidon[E]) Type() []byte

Type returns the type of HashFunction for the HashPoseidon

Jump to

Keyboard shortcuts

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