rfc4122.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. _rfc4122:
  2. ==============
  3. RFC 4122 UUIDs
  4. ==============
  5. .. toctree::
  6. :titlesonly:
  7. :hidden:
  8. rfc4122/version1
  9. rfc4122/version2
  10. rfc4122/version3
  11. rfc4122/version4
  12. rfc4122/version5
  13. rfc4122/version6
  14. rfc4122/version7
  15. rfc4122/version8
  16. `RFC 4122`_ defines five versions of UUID, while a `new Internet-Draft under
  17. review`_ defines three new versions. Each version has different generation
  18. algorithms and properties. Which one you choose depends on your use-case. You
  19. can find out more about their applications on the specific page for that version.
  20. Version 1: Gregorian Time
  21. This version of UUID combines a timestamp, node value (in the form of a MAC
  22. address from the local computer's network interface), and a clock sequence
  23. to ensure uniqueness. For more details, see :doc:`rfc4122/version1`.
  24. Version 2: DCE Security
  25. This version of UUID is the same as Version 1, except the ``clock_seq_low``
  26. field is replaced with a *local domain* and the ``time_low`` field is
  27. replaced with a *local identifier*. For more details, see
  28. :doc:`rfc4122/version2`.
  29. Version 3: Name-based (MD5)
  30. This version of UUID hashes together a namespace and a name to create a
  31. deterministic UUID. The hashing algorithm used is MD5. For more details, see
  32. :doc:`rfc4122/version3`.
  33. Version 4: Random
  34. This version creates a UUID using truly-random or pseudo-random numbers. For
  35. more details, see :doc:`rfc4122/version4`.
  36. Version 5: Named-based (SHA-1)
  37. This version of UUID hashes together a namespace and a name to create a
  38. deterministic UUID. The hashing algorithm used is SHA-1. For more details,
  39. see :doc:`rfc4122/version5`.
  40. Version 6: Reordered Time
  41. This version of UUID combines the features of a
  42. :ref:`version 1 UUID <rfc4122.version1>` with a *monotonically increasing*
  43. UUID. For more details, see :ref:`rfc4122.version6`.
  44. Version 7: Unix Epoch Time
  45. This version of UUID combines a timestamp--based on milliseconds elapsed
  46. since the Unix Epoch--and random bytes to create a monotonically increasing,
  47. sortable UUID without the privacy and entropy concerns associated with
  48. version 1 and version 6 UUIDs. For more details, see :ref:`rfc4122.version7`.
  49. Version 8: Custom
  50. This version of UUID allows applications to generate custom identifiers in
  51. an RFC-compatible format. For more details, see :doc:`rfc4122/version8`.
  52. .. _RFC 4122: https://tools.ietf.org/html/rfc4122
  53. .. _new Internet-Draft under review: https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis-00