MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / uuid3

Function uuid3

tools/python-3.11.9-amd64/Lib/uuid.py:712–719  ·  view source on GitHub ↗

Generate a UUID from the MD5 hash of a namespace UUID and a name.

(namespace, name)

Source from the content-addressed store, hash-verified

710 clock_seq_hi_variant, clock_seq_low, node), version=1)
711
712def uuid3(namespace, name):
713 """Generate a UUID from the MD5 hash of a namespace UUID and a name."""
714 from hashlib import md5
715 digest = md5(
716 namespace.bytes + bytes(name, "utf-8"),
717 usedforsecurity=False
718 ).digest()
719 return UUID(bytes=digest[:16], version=3)
720
721def uuid4():
722 """Generate a random UUID."""

Callers

nothing calls this directly

Calls 2

UUIDClass · 0.85
digestMethod · 0.80

Tested by

no test coverage detected