> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function poseidon2_hash_subarray

Module: `protocol_types::hash`

```rust
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.
