Globally Unique Identifier - Text Encoding

Text Encoding

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

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

For the first three fields, the most significant digit is on the left. The last two fields are treated as eight separate bytes, each having their most significant digit on the left, and they follow each other from left to right. Note that the digit order of the fourth field may be unexpected, since it's treated differently than in the structure.

Often braces are added to enclose the above format, such as:

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

When printing fewer characters is desired, GUIDs are sometimes encoded into a base64 or Ascii85 string.

A base64-encoded GUID consists of 22 to 24 characters (depending on padding), for instance:

4AQlP4lP0xGaDAMF6CwzAQ
4AQlP4lP0xGaDAMF6CwzAQ==

and Ascii85 encoding gives 20 characters, for example:

5:$Hj:Pf\4RLB9%kU\Lj

In Uniform Resource Names (URN), GUIDs have namespace identifier "uuid", e.g.:

urn:uuid:3F2504E0-4F89-11D3-9A0C-0305E82C3301

Read more about this topic:  Globally Unique Identifier

Famous quotes containing the word text:

    Don Pedro. But when shall we set the savage bull’s horns on the sensible Benedick’s head?
    Claudio. Yes, and text underneath, “Here dwells Benedick, the married man?”
    William Shakespeare (1564–1616)