---
title: HashExpression type | Wartiva GraphQL API
description: Hash represents an nftables expression for computing a hash value from packet data. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/hash-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `HashExpression` type

Hash represents an nftables expression for computing a hash value from packet data. This can be used for load balancing, consistent hashing, or distributing traffic.

## Fields

| Field Name | Description |
|---|---|
| `sourceRegister` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register holding the input data from which the hash will be computed. |
| `destRegister` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register where the computed hash value will be stored. |
| `length` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | The length of the data in bytes to include in the hash computation. |
| `modulus` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | The modulus to apply to the hash result, effectively limiting its range (e.g., hash % modulus). |
| `seed` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | An optional seed value to initialize the hash function, affecting its output. |
| `offset` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | The byte offset within the input data to start the hash computation. |
| `type` - [`HashType!`](https://wartiva.com/api-docs/types/hash-type.html) | The type of hashing algorithm to use. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{
  "sourceRegister": "VERDICT",
  "destRegister": "VERDICT",
  "length": "1073741824",
  "modulus": "1073741824",
  "seed": "1073741824",
  "offset": "1073741824",
  "type": "JENKINS"
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
