Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
hashlib.md5
1 parent 1d4216a commit 5c87adfCopy full SHA for 5c87adf
1 file changed
Lib/uuid.py
@@ -723,8 +723,8 @@ def uuid3(namespace, name):
723
"""Generate a UUID from the MD5 hash of a namespace UUID and a name."""
724
if isinstance(name, str):
725
name = bytes(name, "utf-8")
726
- import _md5
727
- h = _md5.md5(namespace.bytes + name, usedforsecurity=False)
+ import hashlib
+ h = hashlib.md5(namespace.bytes + name, usedforsecurity=False)
728
int_uuid_3 = int.from_bytes(h.digest())
729
int_uuid_3 &= _RFC_4122_CLEARFLAGS_MASK
730
int_uuid_3 |= _RFC_4122_VERSION_3_FLAGS
0 commit comments