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
GUID STRUCT Data1 dd Data2 dw Data3 dw Data4 db 8 GUID ENDSThe 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:
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:- IID - interface identifier;
- CLSID - class identifier;
- LIBID - type library identifier;
- CATID - category identifier; (its presence on a class identifies it as belonging to certain class categories)
- AppID - application identifier;
- MID - machine identifier;
- IPID - interface pointer identifier; (applicable to an interface engaged in RPC)
- CID - causality identifier; (applicable to a RPC session)
- OID - object identifier; (applicable to an object instance)
- OXID - object exporter identifier; (applicable to an instance of the system object that performs RPC)
- SETID - ping set identifier; (applicable to a group of objects)
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
- [DmaId for InstanceId Values (DCE Universally Unique IDentifiers, UUIDs)]
- [Syntax and semantics of the DCE variant of Universal Unique Identifiers (UUIDs)]
- [Draft UUID specification (includes sample code)]
- [A Universally Unique IDentifier (UUID) URN Namespace]
- [UUID (GUID) Generator on the Web]
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.
