Boost logo

Boost :

Subject: Re: [boost] [uuid] basic_random_generator doesn't produce a fully randomized uuid when sizeof(unsigned long) == 4
From: Scott McMurray ([hidden])
Date: 2010-03-02 10:53:10

On 2 March 2010 06:21, Sylvester-Bradley, Gareth
<Gareth.Sylvester-Bradley_at_[hidden]> wrote:
> Is 8 bytes of randomness enough, or is this a mistake?

This is definitely a mistake, since it means only about 4 billion 'til
a collision, completely destroying the utility of random UUIDs. Not
to mention that shifting by >= the width isn't well-defined, which
means there's no guarantee it even gives different UUIDs.

Good catch.

Boost list run by bdawes at, gregod at, cpdaniel at, john at