Skip to content

Commit

Permalink
Merge pull request #30 from nevans/uuid-rfc9562
Browse files Browse the repository at this point in the history
Update UUID documentation with RFC9562 links
  • Loading branch information
hsbt authored Jun 20, 2024
2 parents 5a73c37 + 1e41c3d commit 4672b81
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/random/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def urlsafe_base64(n=nil, padding=false)
#
# The result contains 122 random bits (15.25 random bytes).
#
# See RFC4122[https://www.rfc-editor.org/rfc/rfc4122] for details of UUID.
# See RFC9562[https://www.rfc-editor.org/rfc/rfc9562] for details of UUIDv4.
#
def uuid
ary = random_bytes(16)
Expand Down Expand Up @@ -204,8 +204,7 @@ def uuid
# Note that this method cannot be made reproducible because its output
# includes not only random bits but also timestamp.
#
# See draft-ietf-uuidrev-rfc4122bis[https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/]
# for details of UUIDv7.
# See RFC9562[https://www.rfc-editor.org/rfc/rfc9562] for details of UUIDv7.
#
# ==== Monotonicity
#
Expand Down Expand Up @@ -242,7 +241,7 @@ def uuid
#
# Counters and other mechanisms for stronger guarantees of monotonicity are
# not implemented. Applications with stricter requirements should follow
# {Section 6.2}[https://www.ietf.org/archive/id/draft-ietf-uuidrev-rfc4122bis-07.html#monotonicity_counters]
# {Section 6.2}[https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters]
# of the specification.
#
def uuid_v7(extra_timestamp_bits: 0)
Expand Down

0 comments on commit 4672b81

Please sign in to comment.