A Universally Unique Identifier, or UUID, is a 128-bit value that can be used to identify an item or element on the Internet in a unique way. The method used to make a UUID is guaranteed to be different from any other UUID until Year 3400.
You can identify anything with UUID. For instance, they can find databases, system instances, primary keys, Bluetooth profiles, or items with short lifespans.
UUID is a word that is similar to GUID. Originally, GUID was a version of UUID that Microsoft used, but the RFC 4122 specification made the two terms the same. The Open Software Foundation (OSF) made UUID a standard. It is now part of the Distributed Computing Environment (DCE). Different versions of UUID follow RFC 4122.
UUIDs are made by an algorithm that uses a timestamp and other things, like the network address, to make them. UUIDTools and Online UUID Generator are free tools you can use to generate UUID.
The UUID uses a variety of components to guarantee uniqueness. UUIDs are made up of a series of digits equal to 128 bits. The ID is in hexadecimal, which means it uses numbers 0-9 and A-F. The length of hexadecimal digits is 32, separated into five sections by hyphens. The number of characters in each hyphen is 8-4-4-4-12. The last section shows the formatting and encoding of either one to three bits.
There are three different variants of the UUID:
Variant 0: Backward compatibility with the antiquated Apollo Network Computing System from the late 1980s is the primary purpose of developing this variation. Its construction is comparable to that of the version 1 UUIDs that are in use today.
Variant 1: Variant 1 is the most common version used today. These different kinds of UUIDs are called RFC 4122/DCE 1.1 UUIDs or "Leach–Salz" UUIDs, after the authors of the original Internet-Draft. As an example, GUIDs are variation 1 UUIDs.
Variant 2: Microsoft said they would only use this variant for backward compatibility. Even though a significant number of the GUIDs that Microsoft employs are UUIDs of version 1, early GUIDs on the Windows platform made use of variant 2. The amount of bits stored in the N position differentiates variant one from variant 2. UUIDs of version 1 use two bits, while UUIDs of variant two using three bits.
The present type of UUID is variant 1. It has five different versions. The main difference between one version and another is how it is created. Types of UUIDs are:
Version 1: This version is produced based on a specific time and node. It is a unique identifier depending on the time stamp.
Version 2: This version is made the same way as version 1, but fewer essential bits are changed. Specifically, eight bits of the clock sequence are changed to a local domain number, and 32 bits of the timestamp are changed to the number for the specified local domain. These UUIDs are reserved for DCE Security.
Version 3: A namespace identifier and a name are hashed together to make this version. Versions 3 and 5 are built similarly, but version 3 uses the message-digest algorithm 5 (MD5) as its hashing algorithm.
Version 4: This particular UUID is produced randomly. Even though the UUID uses random bytes, version 4 is indicated by using four bits, and the variation is shown by using two to three bits. These may be created using a generator that generates random or pseudo-random numbers. Because this version uses more bits, the number of possible UUID combinations has been reduced. However, there are still a sufficient number of UUID combinations to eliminate the risk of a collision.
Version 5: The creation of version 5 follows the same process as version 3. On the other hand, it is hashed using Secure Hash Algorithm 1, often known as SHA-1, rather than MD5, which is the algorithm version 3 employs for hashing. Within a system's namespace, versions 3 and 5 are excellent candidates for usage as unambiguous identifiers for the information and data they include.
The Nil UUID is a different version of the UUID format that serves as a particular situation. This UUID is wholly made up of zeros for the numbers.
If the same UUID is made more than once and given to different objects, this is called a collision. Even though it is possible, it is doubtful that any other UUID will have the same 128-bit value. The chance is so nearly zero for all practical purposes that it doesn't matter. Even though there are fewer possible UUID combinations in version 4, the possibility of a collision is low enough to allow it to be ignored.