---
title: fastly.hash
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/miscellaneous/fastly-hash
---

```
INTEGER fastly.hash(STRING key, INTEGER seed, INTEGER from, INTEGER to)
```

**Available in:** all subroutines

Returns a hash value of the string `key`, using `seed`, and returning
a number between `from` and `to`, inclusive.

The underlying hash function might not offer cryptographic properties or 
collision resistance guarantees.

## Example

```vcl
declare local var.hurl INTEGER;
set var.hurl = fastly.hash(req.url, 0, 0, 1023);
```
