Subject: Re: [boost] [UUID] version v12
From: Andy Tompkins (atompkins_at_[hidden])
Date: 2008-10-09 10:41:37
On Thu, 9 Oct 2008 13:15:23 +0800, "Atry" <pop.atry_at_[hidden]> said:
> Hi Andy, I saw the source code in seed_rng.hpp, I found you use an
> uninitialized buffer if fopen fails. It often rely on the stack
> contents when previous calling function runs, and that is not
> always random.
> I think UUID does not need to be random, it just need to be uniquely.
> So the seed should contains process id, time, MAC address and so on.
There are different types of uuids based on different algorithms. In
this case uuid_generator is generating a random-based uuids, and so a
random number generator is used and needs to be seeded well to produce
the best possible random data. Another type of uuid is a time-based
uuid, which does incorporate data like the MAC address. I have not
implemented this algorithm.
Still I could use data such as process id, and MAC address as random
data itself, or to seed a random number generator, but I don't know of
portable ways to get this data.
< snip >
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk