How short can a GUID be?

前端 未结 6 1803
离开以前
离开以前 2021-02-07 04:01

I know the standard GUIDs. Can they be made shorter? What is the theory behind it?

6条回答
  •  一个人的身影
    2021-02-07 04:34

    They are exactly 16 bytes.

    Technically speaking the effect of shortening them will vary based on the algorithm used to generate them. Considering, the API you used (probably) doesn't guarantee a particular version or implementation, it's a bad idea to shorten them. Even if it did, it's a bad idea. If you require less than 16 bytes of entropy, you should prob not be using a GUID.

    For more information: http://en.wikipedia.org/wiki/Globally_Unique_Identifier

提交回复
热议问题