2 ms·
I like that this generates the ID directly by choosing random symbols. But I don't like that it's equivalent to UUID v4 but different. The difference doesn't b
by jmull 9y ago
I like that this generates the ID directly by choosing random symbols.
But I don't like that it's equivalent to UUID v4 but different. The difference doesn't buy anything significant over the standard.
With a pretty small change this could directly generate base64 encoded UUID v4 (without going through a two-step process of generating a UUID and then encoding it: Most characters could be generated randomly from the base64 alphabet. The characters at certain indexes would need to use a restricted set of base64 characters to set certain bits to the values specified by UUID v4.