poseidon

package
v1.0.1-action-workflow... Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 6 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)

Hash computes the Poseidon hash for the given fixed-size inputs, select specs automatically from the size, no capacity flag is applied

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