poseidon

package
v0.0.0-...-151d192 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NROUNDSF = 8 //nolint:golint

Variables

View Source
var NROUNDSP = []int{56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68} //nolint:golint

Functions

func CodeHash

func CodeHash(code []byte) (h common.Hash)

func Hash

func Hash(inpBI []*big.Int, width int) (*big.Int, error)

for short, use size of inpBI as cap

func HashFixed

func HashFixed(inpBI []*big.Int) (*big.Int, error)

Deprecated HashFixed entry, with domain field is 0

func HashFixedWithDomain

func HashFixedWithDomain(inpBI []*big.Int, domain *big.Int) (*big.Int, error)

Hash computes the Poseidon hash for the given fixed-size inputs, with specified domain field

func HashWithCap

func HashWithCap(inpBI []*big.Int, width int, nBytes int64) (*big.Int, error)

Hash using possible sponge specs specified by width (rate from 1 to 15), the size of input is applied as capacity (notice we do not include width in the capacity )

Types

This section is empty.

Jump to

Keyboard shortcuts

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