Uuid::generate( 4 ) produces a uuid4 without it's rfc defined version information
tebruno99 opened this issue · 0 comments
tebruno99 commented
I've been troubleshooting parts our our application and came across uuid's that I believe do not have their RFC4122 version information.
Uuid::generate( 4 )->string
Example:
14326a6c-184f-11ea-9e97-06aad2cae86c
A version 4 UUID is defined in RFC 4122: 128 randomly-generated bits with six bits at certain positions set to particular values.
the four most significant bits of the 7th byte to 0100'B, so the high nibble is "4"
set the two most significant bits of the 9th byte to 10'B, so the high nibble will be one of "8", "9", "A", or "B"
https://www.cryptosys.net/pki/uuid-rfc4122.html
https://tools.ietf.org/html/rfc4122#section-4.1.3