Why are UUID / GUID's in the format they are?

Posted by Xeoncross on Programmers See other posts from Programmers or by Xeoncross
Published on 2012-10-14T01:52:27Z Indexed on 2012/10/14 9:50 UTC
Read the original article Hit count: 206

Filed under:

Globally Unique Identifiers (GUID) are a grouped string with a specific format which I assume has a security reason.

A GUID is most commonly written in text as a sequence of hexadecimal digits separated into five groups, such as:

3F2504E0-4F89-11D3-9A0C-0305E82C3301

Why aren't GUID/UUID strings just random bytes encoded using hexadecimal of X length?

This text notation contains the following fields, separated by hyphens:

| Hex digits | Description
|-------------------------
| 8            | Data1
| 4            | Data2
| 4            | Data3
| 4            | Initial two bytes from Data4
| 12           | Remaining six bytes from Data4

There are also several versions of the UUID standards.

Version 4 UUIDs are generally internally stored as a raw array of 128 bits, and typically displayed in a format something like:

uuid:xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

© Programmers or respective owner

Related posts about uuid