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

# Trait Hasher

Module: `std::hash`

```rust
pub trait Hasher {
    // Required methods
    pub fn finish(self) -> Field;
    pub fn write(&mut self, input: Field);

    // Provided methods
    pub fn finish_ref(&self) -> Field { ... }
}
```

## Required methods

```rust
pub fn finish(self) -> Field
```

```rust
pub fn write(&mut self, input: Field)
```

## Provided methods

```rust
pub fn finish_ref(&self) -> Field
```

Returns the hash value without consuming the hasher. Override this for more efficient implementations that avoid copying. TODO: deprecate finish() and replace it

## Implementors

```rust
impl Hasher for MaxHasher
```

```rust
impl Hasher for Poseidon2Hasher
```

```rust
impl Hasher for Poseidon2Hasher
```

```rust
impl Hasher for Poseidon2Hasher
```

```rust
impl Hasher for PoseidonHasher
```

```rust
impl Hasher for PoseidonHasher
```
