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

# Function compute_note_hash

Module: `noir_aztec::note::utils`

```rust
pub fn compute_note_hash<let N: u32>(storage_slot: Field, data: [Field; N]) -> Field
```

Computes a domain-separated note hash.

Receives the `storage_slot` of the [`crate::state_vars::StateVariable`](/aztec-nr-api/v6.0.0/noir_aztec/state_vars/trait.StateVariable.md) that holds the note, plus any arbitrary note `data`. This typically includes randomness, owner, and domain specific values (e.g. numeric amount, address, id, etc.).

Usage of this function guarantees that different state variables will never produce colliding note hashes, even if their underlying notes have different implementations.
