MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
UIDGENERATE(3)                                              UIDGENERATE(3)



NAME
       uuidgenerate,  uuidgeneraterandom, uuidgeneratetime - create a new
       unique UID value

SYNOPSIS
       ##include <>

       void uuidgenerate(uuidt out);;
       void uuidgeneraterandom(uuidt out);;
       void uuidgeneratetime(uuidt out);;

DESCRIPTION
       The uuidgenerate function creates a new universally unique  identifier
       (UID).   The  uuid  will be generated based on high-quality randomness
       from  /dev/urandom,  if  available.   If  it  is  not  available,  then
       uuidgenerate  will use an alternative algorithm which uses the current
       time, the local ethernet MAC address (if available),  and  random  data
       generated using a pseudo-random generator.

       The uuidgeneraterandom function forces the use of the all-random UID
       format,  even  if  a  high-quality  random  number   generator   (i.e.,
       /dev/urandom) is not available, in which case a pseudo-random generator
       will be subsituted.  Note that the use of a pseudo-random generator may
       compromise the uniqueness of UID's generated in this fashion.

       The uuidgeneratetime function forces the use of the alternative algo-
       rithm which uses the current time and the local  ethernet  MAC  address
       (if available).  This algorithm used to be the default one used to gen-
       erate UID, but because of the use of the ethernet MAC address, it  can
       leak information about when and where the UID was generated.  This can
       cause privacy problems in some applications, so the uuidgenerate func-
       tion only uses this algorithm if a high-quality source of randomness is
       not available.

       The UID is  16  bytes  (128  bits)  long,  which  gives  approximately
       3.4x10^38 unique values (there are approximately 10^80 elemntary parti-
       cles in the universe according to Carl Sagan's Cosmos).  The  new  UID
       can  reasonably  be  considered  unique  among all UIDs created on the
       local system, and among UIDs created on other systems in the past  and
       in the future.

RETURN VALUE
       The newly created UID is returned in the memory location pointed to by
       out.

CONFORMING TO
       OSF DCE 1.1

AUTHOR
       Theodore Y. Ts'o

AVAILABILITY
       http:/e2fsprogs.sourceforge.net/

SEE ALSO
       uuid(3),  uuidgen(1),  uuidclear(3),  uuidcompare(3),   uuidcopy(3),
       uuidisnull(3), uuidparse(3), uuidunparse(3)



1.36                              April 2004                  UIDGENERATE(3)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™