Closed timuckun closed 11 years ago
Yes. It's using the namespace plus a value that's already guaranteed to be unique to generate the UUID. Do not use this variant if the underlying data is not already guaranteed to be universally unique.
I should add, DNS namespace is the hostname only. The example you gave would be incorrect. So "github.com"
not "http://github.com"
.
UUIDTools::UUID.sha1_create(UUIDTools::UUID_DNS_NAMESPACE, "http://github.com").to_s => "de33c012-0cb8-5281-8f42-768c47f00bd7"