uuid.uuid1()返回非常相似的结果[重复](uuid.uuid1() returns pretty similar results [duplicate])
这个问题在这里已有答案:
使用哪个UUID版本? 4个答案我在Python中用uuid.uuid1()生成了uuid,它们看起来非常相似。 这是为什么? 如何将它们随机化?
This question already has an answer here:
Which UUID version to use? 4 answersI've generated uuid's by uuid.uuid1() in Python and they all look pretty similar. Why is that? How to randomize them?
最满意答案
这是因为uuid1是根据您的机器ID和时间戳生成的,并且您的机器中的机器ID保持不变,这就是为什么它们在最后看起来非常相似。 您可以使用uuid4()来获取随机唯一的uuid 。
That is because the uuid1 is generated from your machine ID and time stamp and the machine ID in your case remains constant, that's why they look pretty similar at the end. You may use uuid4() to get a random unique uuid.
更多推荐
发布评论