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

```
STRING uuid.version5(STRING namespace, STRING name)
```

**Available in:** all subroutines

Derives a UUID corresponding to `name` within the given `namespace` using
SHA-1 hash function. The namespace itself is identified by a UUID. The name
must be in a canonical form appropriate for the selected namespace.

> **IMPORTANT:** In principle, names can be arbitrary octet strings. This implementation will, however, truncate at the first NUL byte.

## Example

```vcl
set req.http.X-Unique-Id = uuid.version5(uuid.dns(), "www.fastly.com");
```
