aztec-nr - protocol_types::hash

Function poseidon2_hash_subarray

pub fn poseidon2_hash_subarray<let N: u32>(input: [Field; N], in_len: u32) -> Field

Computes a Poseidon2 hash over a dynamic-length subarray of the given input. Only the first in_len fields of input are absorbed; any remaining fields are ignored. The caller is responsible for ensuring that the input is padded with zeros if required.