Is the UUIDGenerator using the algoritm to generate IETF UUID version 4 (random) ? If so, can you add to documentation with reference to the IETF standard ? If it is version 4 (random), can you explain which library is used as seed for the random number?
Page 1 / 1
Hi @tiemens_g,
The function the UUIDGenerator relies on respect OS api calls to generate UUIDs:
- Windows use UuidCreate() function documented here: https://docs.microsoft.com/en-us/windows/desktop/api/rpcdce/nf-rpcdce-uuidcreate
- Mac use CFUUIDCreate() function documented here: https://developer.apple.com/documentation/corefoundation/cfuuid-rci
- Linux use uuid_generate() function documented here:https://linux.die.net/man/3/uuid_generate
Dependent on your system you should be able to find out which algorithm these functions use.
Hi @tiemens_g,
it is my understanding that you can refer the version of a UUID from the typical 8-4-4-4-12 representation (AAAAAAAA-BBBB-CCCC-DDDD-FFFFFFFFFFFF) by
- Checking for current variant: Test if the first bit of the DDDD-part equals to 8, 9, A or B.
- Get the first bit of the CCCC-Part and treat it as version information. Hence, if this bit is 4, the generated UUID is version 4 (randomly generated).
Also, have a look at:
- https://tools.ietf.org/html/rfc4122#section-4.1.3
- https://stackoverflow.com/questions/1709600/what-kind-of-data-can-you-extract-from-a-uuid
Based on that, it is my conclusion that UUIDGenerator simply returns randomly created UUIDs (version 4).
Having to work with UUID (in FME) myself I stumbled upon your question. It seems to me, that there was no answer regarding the version used of UUIDGenerator, yet. Unfortunately, the transfomer's documentation is very sparse....