Skip to main content

Mimc

DataMissing

error DataMissing()

Thrown when the data is not provided

DataIsNotMod32

error DataIsNotMod32()

Thrown when the data is not purely in 32 byte chunks

FR_FIELD

uint256 FR_FIELD

hash

function hash(bytes _msg) external pure returns (bytes32 mimcHash)

Performs a MiMC hash on the data provided

Only data that has length modulus 32 is hashed, reverts otherwise

Parameters

NameTypeDescription
_msgbytesThe data to be hashed

Return Values

NameTypeDescription
mimcHashbytes32The computed MiMC hash