diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-01-03 10:37:59 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-01-03 10:37:59 +0000 |
commit | 4e9fa7e339a1cd6cb2fec643715991bcf5057cec (patch) | |
tree | 3ce1635c0868ccd41492c02903ef1bbde10698db /sal/inc/rtl/uuid.h | |
parent | 0a587a532e01149d1f98937d62112d13002dea37 (diff) |
INTEGRATION: CWS sb67 (1.7.188); FILE MERGED
2006/12/13 15:00:13 sb 1.7.188.1: #i51501# rtl_createUuid now generates version 4 instead of version 1 UUIDs.
Diffstat (limited to 'sal/inc/rtl/uuid.h')
-rw-r--r-- | sal/inc/rtl/uuid.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/sal/inc/rtl/uuid.h b/sal/inc/rtl/uuid.h index c369ae8bbb2e..7eda5ad59da5 100644 --- a/sal/inc/rtl/uuid.h +++ b/sal/inc/rtl/uuid.h @@ -4,9 +4,9 @@ * * $RCSfile: uuid.h,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-09-08 14:46:10 $ + * last change: $Author: hr $ $Date: 2007-01-03 11:37:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -68,24 +68,19 @@ extern "C" { #endif -/** Generates a new UUID (Universally Unique IDentifier). - If available, the ethernetaddress of a networkcard is used, otherwise - a 6 Byte random number is generated( for which rtlRandomPool is used ). +/** Generates a new Version 4 (random number based) UUID (Universally Unique + IDentifier). @param pTargetUUID pointer to at least 16 bytes of memory. After the call it contains the newly generated uuid in network byte order. @param pPredecessorUUID pointer to the previously generated uuid in network byte - order. The generator reuses the 6-Byte random value - and the two byte context value and ensures, - that pTargetUUID is generated with a later timestamp. + order. The generator uses this value to seed the + random number generator and thus makes it highly + unlikely that consecutive calls produce equal + results. Set pPredecessorUUID to 0 if no predecessor is available. - The caller is responsible for making the value persistent - (if desired). - @param bUseEthernetAddress if <code>sal_True</code>, the generator uses the ethernet - address of a network card (if available). - if <code>sal_False</code>, the generator generates a new - 6-Byte random - value each time it is called with pPredecessorUUID = 0. + @param bUseEthernetAddress ignored (was used when this function returned + Version 1 instead of Version 4 UUIDs). */ void SAL_CALL rtl_createUuid( sal_uInt8 *pTargetUUID , const sal_uInt8 *pPredecessorUUID, |