I&#39;ve implemented RFC 4122 Universally Unique Identifiers (UUIDs) and have an interesting dilemma. Two of the types of UUIDs are generated based on a namespace UUID and name using either MD5 (a type 3 UUID) or SLA-1 (a type 5 UUID) hashes. I implemented the type 3 and type 5 UUIDs in accordance with RFC 4122 - in particular, my result for the type 3 example in the RFC matches the result I get; there is no type 5 example. Then I checked it against the Python implementation and got a different answer. After a bit of a search I found a post by the original author of the Python code that said he felt the RFC implementation was in error. Anyway, the Unix uuid command matches the Python answer, but I have found others (e.g., Apache and PHP that match (or did match) the RFC). For the curious, the difference has to do with byte-swapping to/from network order.<br>
<br>I&#39;ve implemented type 3 and type 5 UUIDs both ways and have separate calls - for example, make-uuid-3 and make-uuid-3*. For now, I have make-uuid-3 matching the Unix uuid command and make-uuid-3* matching the RFC. The same goes for type 5 UUIDs.<br>
<br>The first question is whether there are any web gurus on the mailing list that might know which really is the correct/preferred implementation. I haven&#39;t found any addenda or anything for RFC 4122 that suggests that the IETF considers the RFC to be in error. On the other hand, the Unix and Python implementations are widely used.<br>
<br>The second question is whether to two functions as described above or a single function with an optional argument to specify which of the two alternatives to use. My initial decision is to use two functions as above, where the Unix uuid values are the unstarred version. So, make-uuid-3 returns the same value as the Unix &#39;uuid -v3&#39; command and make-uuid-3* returns the same value as the RFC reference implementation. [My assumption being that the Unix uuid version is the more wide used, but I may be totally wrong.]<br>
<br>I do feel I should provide both, since both seem to exist &#39;in the wild&#39; and the purpose of type 3 and 5 UUIDs is to be repeatable.<br><br>For those interested, the package also produces type 1 (time-based) and type 4 (random) UUIDs.<br>
<br>Doug<br>