Appendix C. Some Name Space IDs
This appendix provides some pre-defined namespace IDs for use with version 3 and version 5 UUID generation:
Namespace for fully-qualified domain names (DNS):
6ba7b810-9dad-11d1-80b4-00c04fd430c8
Namespace for URLs:
6ba7b811-9dad-11d1-80b4-00c04fd430c8
Namespace for ISO OIDs:
6ba7b812-9dad-11d1-80b4-00c04fd430c8
Namespace for X.500 DNs:
6ba7b814-9dad-11d1-80b4-00c04fd430c8
Usage Example:
To generate a UUID for a domain name using version 5 (SHA-1):
import uuid
# Use DNS namespace
dns_namespace = uuid.UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8')
# Generate UUID for "example.com"
result = uuid.uuid5(dns_namespace, 'example.com')
print(result)
# Output: cfbff0d1-9375-5685-968c-48ce8b15ae17