Skip to main content
2 of 2
replaced https://tools.ietf.org/html/rfc with https://www.rfc-editor.org/rfc/rfc

UUID4 does not rely on the machine's MAC address, from the documentation:

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.

However, UUIDs of any kind do not promise to be cryptographically secure as it is not guaranteed in the RFC. Certain implementations may use a cryptographically secure random number generator, but I wouldn't rely on it. I would choose to use another library if that is what is needed. If you are using Python3 you can use the secrets library which has functions for doing just this.

Casey
  • 915
  • 6
  • 19