Generates an RFC 4122 version 4 compliant Universally Unique
Identifier (UUID), also known as a Globally Unique Identifier
(GUID). GUID (aka UUID) is an acronym for 'Globally Unique
Identifier' (or 'Universally Unique Identifier'). It is a
128-bit integer number used to identify resources. The term GUID
is generally used by developers working with Microsoft
technologies, while UUID is used everywhere else.
In SGML, HTML and XML documents, the logical constructs known as
character data and attribute values consist of sequences of
characters, in which each character can manifest directly
(representing itself), or can be represented by a series of characters
called a character reference, of which there are two types: a numeric
character reference and a character entity reference. This article
lists the character entity references that are valid in HTML and XML
documents.
128-bits is big enough and the generation algorithm is unique enough
that if 1,000,000,000 GUIDs per second were generated for 1 year the
probability of a duplicate would be only 50%. Or if every human on
Earth generated 600,000,000 GUIDs there would only be a 50%
probability of a duplicate.
How are GUIDs used?
GUIDs are used in enterprise software development in C#, Java, and C++
as database keys, component identifiers, or just about anywhere else a
truly unique identifier is required. GUIDs are also used to identify
all interfaces and objects in COM programming.