portable UUID/GUID generation?

D

David Garamond

Is there one? Haven't found anything suitable on RAA. I need to generate
GUID/UUID on Linux as well as Windows using the same algorithm (and
preferably without using an external library, except for fetching MAC
address).
 
D

David Garamond

David said:
Is there one? Haven't found anything suitable on RAA. I need to generate
GUID/UUID on Linux as well as Windows using the same algorithm (and
preferably without using an external library, except for fetching MAC
address).

To change my question into another. I just finished writing a Uuid class
according to the algorithm explained in:

http://www.ics.uci.edu/~ejw/authoring/uuid-guid/draft-leach-uuids-guids-01.txt

but then I read Microsoft is no longer using GUID, but some random
number generator. Is it correct that as long as the MAC address is used
as one of the sources of the random seed, something like this is as
"unique" as the old UUID/GUID?

$ ruby -rmd5 -e'p MD5.new("some random string, incorporating timestamp,
MAC address, and some other random seeds")'

or

$ ruby -rsha1 -e'p SHA1.new("some random string, incorporating
timestamp, MAC address, and some other random seeds")'

and I can just as well feed the whole output of ifconfig or ipconfig
/all command.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,813
Members
47,357
Latest member
sitele8746

Latest Threads

Top