level 5
javran
楼主
Globally Unique Identifier
A globally unique identifier or GUID (pronounced /ˈɡuːɪd/ or /ˈɡwɪd/) is a special type of identifier used in software applications in order to provide a reference number which is unique in any context (hence, "globally"), for example, in defining the internal reference for a type of access point in a software application, or for creating unique keys in a database. While each generated GUID is not guaranteed to be unique, the total number of unique keys (2128 or 3.4×1038) is so large that the probability of the same number being generated twice is infinitesimally small. For example, consider the observable universe, which contains about 5×1022 stars; every star could then have 6.8×1015 unique GUIDs.
The term GUID usually refers to Microsoft's implementation of the Universally Unique Identifier (UUID) standard. However, the term is common in applications not written by Microsoft, or for their operating systems. The GUID is also the basis of the GUID Partition Table, Intel's replacement for Master Boot Records under EFI, and of Preboot Execution Environment, Intel's environment to boot computers using a network interface.
Contents [hide]
1 Basic structure
2 Text encoding
3 Algorithm
4 Uses
5 Subtypes
6 XML syndication formats
7 See also
8 References
9 External links
[edit]Basic structure
The GUID is a 16-byte (128-bit) number. The most commonly used structure of the data type is:
BitsOctetsDescriptionEndianness
324Data1Native
162Data2Native
162Data3Native
648Data4Big
Data4 stores the bytes in the same order as displayed in the GUID text encoding (see below), but other three fields are reversed on little-endian systems (e.g. Intel CPUs).
One to three of the most significant bits of the second byte in Data 4 define the type variant of the GUID:
2009年07月04日 05点07分
1
A globally unique identifier or GUID (pronounced /ˈɡuːɪd/ or /ˈɡwɪd/) is a special type of identifier used in software applications in order to provide a reference number which is unique in any context (hence, "globally"), for example, in defining the internal reference for a type of access point in a software application, or for creating unique keys in a database. While each generated GUID is not guaranteed to be unique, the total number of unique keys (2128 or 3.4×1038) is so large that the probability of the same number being generated twice is infinitesimally small. For example, consider the observable universe, which contains about 5×1022 stars; every star could then have 6.8×1015 unique GUIDs.
The term GUID usually refers to Microsoft's implementation of the Universally Unique Identifier (UUID) standard. However, the term is common in applications not written by Microsoft, or for their operating systems. The GUID is also the basis of the GUID Partition Table, Intel's replacement for Master Boot Records under EFI, and of Preboot Execution Environment, Intel's environment to boot computers using a network interface.
Contents [hide]
1 Basic structure
2 Text encoding
3 Algorithm
4 Uses
5 Subtypes
6 XML syndication formats
7 See also
8 References
9 External links
[edit]Basic structure
The GUID is a 16-byte (128-bit) number. The most commonly used structure of the data type is:
BitsOctetsDescriptionEndianness
324Data1Native
162Data2Native
162Data3Native
648Data4Big
Data4 stores the bytes in the same order as displayed in the GUID text encoding (see below), but other three fields are reversed on little-endian systems (e.g. Intel CPUs).
One to three of the most significant bits of the second byte in Data 4 define the type variant of the GUID: