Is there a way to distinguish a GUID from just a random number?

后端 未结 2 1123

Being able to distinguish a GUID from random data can be useful when debugging obscure code defects.

On Windows each GUID generated is of version 4 therefore it has

2条回答
  •  臣服心动
    2021-01-12 18:42

    Besides GUID version (0100), there's also something called the GUID variant. This will be 2 bits (10) in octet 8. The remaining bits a of v4 GUID are by definition random.

提交回复
热议问题