crypto

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pedersen

func Pedersen(a, b *felt.Felt) *felt.Felt

Pedersen implements the Pedersen hash.

func PedersenArray

func PedersenArray(elems ...*felt.Felt) *felt.Felt

PedersenArray implements Pedersen array hashing.

func Poseidon added in v0.2.1

func Poseidon(x, y *felt.Felt) *felt.Felt

Poseidon implements the Poseidon hash.

func PoseidonArray added in v0.2.1

func PoseidonArray(elems ...*felt.Felt) *felt.Felt

PoseidonArray calculates Poseidon hash over elems If len(elems) is odd, pads with [1] If len(elems) is even, pads with [1, 0]

PoseidonArray implements Poseidon array hashing.

func StarknetKeccak

func StarknetKeccak(b []byte) (*felt.Felt, error)

StarknetKeccak implements Starknet keccak

Types

This section is empty.

Jump to

Keyboard shortcuts

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