Files
php-uuid/docs/rfc4122.rst
T
2022-09-12 20:46:34 -05:00

55 lines
1.8 KiB
ReStructuredText

.. _rfc4122:
==============
RFC 4122 UUIDs
==============
.. toctree::
:titlesonly:
:hidden:
rfc4122/version1
rfc4122/version2
rfc4122/version3
rfc4122/version4
rfc4122/version5
rfc4122/version6
`RFC 4122`_ defines five versions of UUID. Each version has different generation
algorithms and properties. Which one you choose to use depends on your use-case.
You can find out more about their applications on the specific page for that
version.
Version 1: Gregorian Time
This version of UUID combines a timestamp, node value (in the form of a MAC
address from the local computer's network interface), and a clock sequence
to ensure uniqueness. For more details, see :doc:`rfc4122/version1`.
Version 2: DCE Security
This version of UUID is the same as Version 1, except the ``clock_seq_low``
field is replaced with a *local domain* and the ``time_low`` field is
replaced with a *local identifier*. For more details, see
:doc:`rfc4122/version2`.
Version 3: Name-based (MD5)
This version of UUID hashes together a namespace and a name to create a
deterministic UUID. The hashing algorithm used is MD5. For more details, see
:doc:`rfc4122/version3`.
Version 4: Random
This version creates a UUID using truly-random or pseudo-random numbers. For
more details, see :doc:`rfc4122/version4`.
Version 5: Named-based (SHA-1)
This version of UUID hashes together a namespace and a name to create a
deterministic UUID. The hashing algorithm used is SHA-1. For more details,
see :doc:`rfc4122/version5`.
Version 6: Reordered Time
This version of UUID combines the features of a
:ref:`version 1 UUID <rfc4122.version1>` with a *monotonically increasing*
UUID. For more details, see :ref:`rfc4122.version6`.
.. _RFC 4122: https://tools.ietf.org/html/rfc4122