Documentation ¶
Index ¶
- Constants
- Variables
- func Hash(inpBI []*big.Int) (*big.Int, error)
- func HashBytes(msg []byte) (*big.Int, error)
- func HashBytesX(msg []byte, frameSize int) (*big.Int, error)
- func HashEx(inpBI []*big.Int, nOuts int) ([]*big.Int, error)
- func HashWithState(inpBI []*big.Int, initState *big.Int) (*big.Int, error)
- func HashWithStateEx(inpBI []*big.Int, initState *big.Int, nOuts int) ([]*big.Int, error)
- func New(frameSize int) (hash.Hash, error)
- func SpongeHash(inputs []*big.Int) (*big.Int, error)
- func SpongeHashX(inputs []*big.Int, frameSize int) (*big.Int, error)
- func Sum(b []byte) []byte
Constants ¶
View Source
const NROUNDSF = 8
NROUNDSF constant from Poseidon paper
Variables ¶
View Source
var NROUNDSP = []int{56, 57, 56, 60, 60, 63, 64, 63, 60, 66, 60, 65, 70, 60, 64, 68}
NROUNDSP constant from Poseidon paper
Functions ¶
func HashBytes ¶ added in v0.0.3
HashBytes returns a sponge hash of a msg byte slice split into blocks of 31 bytes
func HashBytesX ¶ added in v0.0.14
HashBytesX returns a sponge hash of a msg byte slice split into blocks of 31 bytes
func HashEx ¶ added in v0.0.17
HashEx computes the Poseidon hash for the given inputs and returns the first nOuts outputs that include intermediate states
func HashWithState ¶ added in v0.0.16
HashWithState computes the Poseidon hash for the given inputs and initState
func HashWithStateEx ¶ added in v0.0.17
func SpongeHash ¶ added in v0.0.14
SpongeHash returns a sponge hash of inputs (using Poseidon with frame size of 16 inputs)
func SpongeHashX ¶ added in v0.0.14
SpongeHashX returns a sponge hash of inputs using Poseidon with configurable frame size
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.