Skip to main content

pedersen

Computes the Pedersen hash of two felt252 values. The Pedersen hash function is a collision-resistant cryptographic hash function that takes two field elements as input and produces a single field element as output.

Parameters

  • a: felt252 - The first input value
  • b: felt252 - The second input value

Returns

  • felt252 - The Pedersen hash of the two input values

Example

  • HashState - For computing Pedersen hashes of multiple values
  • PedersenTrait - Trait for creating new hash states