1.2. UUIDv2 (original) (raw)

DCE Security UUID

DCE Security UUID is similar to UUIDv1, except the least significant 8 bits of the clock sequence are replaced by a "local domain" number, and the least significant 32 bits of the timestamp are replaced by an integer identifier meaningful within the specified local domain.

💡 HINT
What Happened to UUIDv2?: https://playfulprogramming.com/posts/what-happened-to-uuid-v2

Creating a DCE Security UUID:

int localIdentifier = 1701; UUID uuid = UuidCreator.getDceSecurity(UuidLocalDomain.LOCAL_DOMAIN_PERSON, localIdentifier);

List of predefined local domains:

The following blockquote is the specification of DCE Security UUID:

These security-version UUIDs are specified exactly as in Appendix A, except that they have the following special properties and interpretations:

By this embedding of local host IDs in (security-version) UUIDs, local host identity information (privilege attributes) can be derived from UUIDs in an especially straightforward and efficient manner (as opposed to, say, going through an auxiliary ID mapping table, maintained either on the local host or elsewhere). (The embedding of local host IDs is specified above in the particular case of POSIX hosts; the embedding in the case of non-POSIX systems is not currently specified in DCE.)

An excellent description of UUIDv2 in Ramsey's PHP library: https://uuid.ramsey.dev/en/stable/rfc4122/version2.html.