Fun Project: xTalk GUID Generator
Mark Smith
mark at maseurope.net
Fri Dec 1 14:52:55 EST 2006
From what I can dimly understand of the various versions of the
spec, there are time-based, name-based and random-based versions.
All of them are built from 1 x 60 bit value, 1 x 14 bit value and 1 x
48 bit value, plus 4 bits for the version id, and 2 bits for the
'variant' (I haven't worked out exactly what that is, but apparently
it should be 1 0.)
In the random version, each of these values (apart from the version
and variant) is generated randomly, or pseudo-randomly.
So my naive question is, for the random version, what would be wrong
with simply generating a random sequence of 128 1s and 0s, sticking
the version and variant bits in the right places, and then
baseConverting the whole thing in groups of 4 to Hex digits. Add the
formatting dashes, and it's done.
This is probably very naive indeed, perhaps someone here understands
the issues well enough to comment.
Best,
Mark
More information about the use-livecode
mailing list