Opentopia Directory Encyclopedia Tools

Globally Unique Identifier

Encyclopedia : G : GL : GLO : Globally Unique Identifier


A Globally Unique Identifier or GUID is a pseudo-random number used in software applications. While each generated GUID is not guaranteed to be unique, the total number of unique keys (2128 or 3.4028×1038) is so large that the possibility of the same number being generated twice is very small.

GUIDs are used in many pieces of software, including Oracle Database and Novell eDirectory, but the most high-profile GUID implementation may be Microsoft's. There is a standard called Universally Unique Identifier (UUID), specified by the Open Software Foundation (OSF).

Basic structure

The GUID (pronounced gwid (as in Squid) especially by Microsoft; alternate pronunciation goo-id) is a 16-byte (128-bit) number, written in hexadecimal form, such as:

3F 25 04 E0 4F 89 11 D3 9A 0C 03 05 E8 2C 33 01
While a GUID strictly has no formal substructure, they may be written in text in varying ways depending on the implementation. In one such method GUIDs are written using the hexadecimal representation of a four-byte word, 2 two-byte words, and a eight-byte word separate by hyphens, such as:

However, the most commonly used structure of the data type is:

GUID STRUCT
Data1 dd
Data2 dw
Data3 dw
Data4 db 8
GUID ENDS
The definition of guid from guidef.h is as shown below:

typedef struct _GUID  GUID;
Using the above structure definitions, a hexadecimal representation could also be:

In the Microsoft component object model, GUIDs are used to uniquely distinguish different software component interfaces. This means that two (possibly incompatible) versions of a component can have exactly the same name but still be distinguishable by their GUIDs.

GUIDs are also inserted into documents from Microsoft Office programs, as these are regarded as objects as well. Even audio or video streams in the Advanced Streaming Format (ASF) are identified by their GUIDs.

In Advanced Streaming Format (ASF) files at least, and probably in general, the GUID data is stored in little endian format as a 32-bit unsigned integer, followed by 2 16-bit unsigned integers, followed by 8 unsigned bytes. Software on hardware with a big endian CPU must reverse the bytes in the first 32-bit, and both 16-bit quantities, the remaining 8 bytes are fine as is. (The display format is somewhat misleading.)

Algorithm

The OSF-specified algorithm used by Microsoft for generating new GUIDs has been widely criticized. In these (V1) GUIDs, the user's network card MAC address was used as a base for the last group of GUID digits, which meant, for example, that a document could be tracked back to the computer that created it. This privacy hole was used when locating the creator of the Melissa worm.

V1 GUIDs which contain a MAC address can be identified by the digit "1" in the first position of the third group of digits, for example . GUIDs using the later algorithm, which has a random suffix have a "4" in the same position, for example .

Subtypes

There are several flavors of GUIDs used in COM: DCOM introduces many additional GUID subtypes: These GUID subspaces may overlap, as the context of GUID usage defines its subtype. For example, there might be a class using same GUID for its CLSID as another class is using for its IID –- all without a problem. On the other hand, two classes using same CLSID couldn't co-exist.

XML syndication formats

There is also a guid tag in some versions of the RSS specification, and mandatory id tag in Atom, which should contain a unique identifier for each individual article or weblog post. In RSS the contents of the guid can be any text, and in practice is typically a copy of the post URL. Atom's IDs need to be valid URIs (usually URLs pointing to the entry, or URNs containing any other unique identifier).

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: