AG UUID

Namespace UUIDs (v3 & v5)

A look at the namespace concept behind the name-based UUIDs v3 and v5 and how to use them.

Concept

v3 and v5 hash a namespace UUID together with a name string to produce a UUID deterministically. The same namespace and name always yield the same UUID, so they are used to map a given input to a stable ID.

Standard Namespaces

There are predefined namespace UUIDs for DNS, URL, OID, and X.500. For example, using the URL namespace lets you always convert a specific domain or link into the same UUID.

v3 vs v5

v3 uses MD5 while v5 uses SHA-1. For new work, v5 is recommended as the better hash. The resulting value is not itself a secret, so do not use it as a security token.