poseidon2_hash2

Function poseidon2_hash2 

Source
pub fn poseidon2_hash2(env: &Env, a: U256, b: U256, sep: Option<U256>) -> U256
Expand description

Hash a pair of U256 values and a domain separation tag using Poseidon2

This function performs Poseidon2 hash on three field elements. The inputs must be within the BN256 field range [0, p-1).

§Arguments

  • env - The Soroban environment
  • a - First input value (must be < BN256 modulus)
  • b - Second input value (must be < BN256 modulus)
  • sep - Domain separation value (must be < BN256 modulus)

§Returns

The hash result as U256

§Panics

Panics if either input is >= BN256 modulus