Questions about GUID's: Are they always fixed in length, and is the middle number always 4?

前端 未结 3 2315
醉酒成梦
醉酒成梦 2021-02-19 18:55

I just generated a few million GUID\'s turned them into a String and got the length... it was always the same. Can I rely on this fixed length of the GUID when converting to St

3条回答
  •  没有蜡笔的小新
    2021-02-19 19:50

    No - a GUID does not have to be a type 4 UUID in fact many GUIDS under windows are UUID's of TYPE 1.

    Type 1 takes the primary MAC, a clock and a sequence. This in fact "Leaks" data since all the UUID1s that are created on the same system will have the same MAC. That is why most GUID functions will take this data and hash it and turn it into a hash-based UUID

提交回复
热议问题