使用版本4:uuid4就可以了

UUID4缺点:糟糕的随机数发生器使得它更有可能发生碰撞,但是概率真的很小

UUID1缺点:暴露隐私

 

If all you want is a unique ID, you should probably call uuid1() or uuid4(). Note that uuid1() may compromise privacy since it creates a UUID containing the computer’s network address. uuid4()creates a random UUID.

 

参考:https://docs.python.org/3.8/library/uuid.html

https://pythoncaff.com/docs/pymotw/uuid-universally-unique-identifiers/156

相关文章:

  • 2021-10-10
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-02-10
猜你喜欢
  • 2021-10-28
  • 2022-12-23
  • 2021-09-16
  • 2021-05-26
相关资源
相似解决方案