About Version 2 UUIDs
Version 2 UUIDs ("DCE Security") replace part of a version 1 UUID with a local identifier such as a POSIX user or group ID, and a domain identifying what kind of ID it is. RFC 9562 reserves the version but does not define it; the layout comes from the DCE 1.1 specification.
They are rare and lose timestamp precision, so almost nobody needs them. We provide the generator for completeness.
When to use it
- Interoperating with DCE-era systems.
When to avoid it
- Everything else. Use v7 (time-ordered) or v4 (random).