Skip to content

v2

v2(localDomain, localId, options?): string

Defined in: src/uuid/v2.ts:22

Version 2 — DCE Security, defined by DCE 1.1 rather than RFC 9562.

RFC 9562 §4.1 lists version 2 as reserved and does not specify it. It replaces the low 32 bits of the v1 timestamp with a local ID and the low byte of the clock sequence with a domain, which leaves roughly one distinct value per 7 minutes per node. Included for completeness; do not choose it for new work.

number

number

TimeUuidOptions = {}

string

v2(DCE_DOMAIN.PERSON, 1000); // "000003e8-9414-21ec-8400-9f6bdeced846"
v2(DCE_DOMAIN.GROUP, 20);
v2(DCE_DOMAIN.ORG, 42);