UUIDs.uuid1 —Functionuuid1([rng::AbstractRNG]) -> UUIDGenerates a version 1 (time-based) universally unique identifier (UUID), as specified byRFC 4122. Note that the Node ID is randomly generated (does not identify the host) according to section 4.5 of the RFC.
The default rng used byuuid1 is notRandom.default_rng() and every invocation ofuuid1() without an argument should be expected to return a unique identifier. Importantly, the outputs ofuuid1 do not repeat even whenRandom.seed!(seed) is called. Currently (as of Julia 1.6),uuid1 usesRandom.RandomDevice as the default rng. However, this is an implementation detail that may change in the future.
Examples
julia> using Randomjulia> rng = MersenneTwister(1234);julia> uuid1(rng)UUID("cfc395e8-590f-11e8-1f13-43a2532b2fa8")UUIDs.uuid4 —Functionuuid4([rng::AbstractRNG]) -> UUIDGenerates a version 4 (random or pseudo-random) universally unique identifier (UUID), as specified byRFC 4122.
The default rng used byuuid4 is notRandom.default_rng() and every invocation ofuuid4() without an argument should be expected to return a unique identifier. Importantly, the outputs ofuuid4 do not repeat even whenRandom.seed!(seed) is called. Currently (as of Julia 1.6),uuid4 usesRandom.RandomDevice as the default rng. However, this is an implementation detail that may change in the future.
Examples
julia> using Randomjulia> rng = Xoshiro(123);julia> uuid4(rng)UUID("856e446e-0c6a-472a-9638-f7b8557cd282")UUIDs.uuid5 —Functionuuid5(ns::UUID, name::String) -> UUIDGenerates a version 5 (namespace and domain-based) universally unique identifier (UUID), as specified byRFC 4122.
Examples
julia> using Randomjulia> rng = Xoshiro(123);julia> u4 = uuid4(rng)UUID("856e446e-0c6a-472a-9638-f7b8557cd282")julia> u5 = uuid5(u4, "julia")UUID("2df91e3f-da06-5362-a6fe-03772f2e14c9")UUIDs.uuid_version —Functionuuid_version(u::UUID) -> IntInspects the given UUID and returns its version (seeRFC 4122).
Examples
julia> uuid_version(uuid4())4Settings
This document was generated withDocumenter.jl version 1.16.0 onThursday 20 November 2025. Using Julia version 1.12.2.