Why is MD5'ing a UUID not a good idea?

前端 未结 6 858
挽巷
挽巷 2021-01-31 18:33

PHP has a uniqid() function which generates a UUID of sorts.

In the usage examples, it shows the following:

$token = md5(uniqid());

But in t

6条回答
  •  广开言路
    2021-01-31 18:55

    Version 3 of UUIDs are already MD5'd, so there's no point in doing it again. However, I'm not sure what UUID version PHP uses.

提交回复
热议问题