Whats more random, hashlib or urandom?

后端 未结 5 1443
旧时难觅i
旧时难觅i 2021-02-05 07:24

I\'m working on a project with a friend where we need to generate a random hash. Before we had time to discuss, we both came up with different approaches and because they are us

5条回答
  •  我寻月下人不归
    2021-02-05 08:17

    if you want a unique identifier (uuid), then you should use

    import uuid
    uuid.uuid4().hex
    

    https://docs.python.org/3/library/uuid.html

提交回复
热议问题