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

前端 未结 6 860
挽巷
挽巷 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 19:11

    As an aside, MD5 is actually obsolete and is not to be used in anything worth protecting - PHI, PII or PCI - from 2010 onwards. The US Feds have ennforced this and any entity non-compliant would be paying lots of $$$ in penalty.

提交回复
热议问题