Function ersatz_uuid4()¶
Defined in File utils.hpp
Function Documentation¶
-
std::string ersatz_uuid4()
Generate a pseudo-random UUID-like identifier.
This function replicates the behaviour of the Python function
ersatz_uuid4from the dxtbx library. It generates a 128-bit random value and formats it as a UUID-style string using little-endian byte order, without enforcing RFC 4122 compliance.The output is a 36-character string in the format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where eachxis a hexadecimal digit.Note
This function does not set the version or variant bits as specified in RFC 4122. It is intended for internal use where uniqueness is sufficient, and compliance with UUID standards is unnecessary.
- Returns:
A string representing the generated UUID-like identifier.