com.compoze.collab.util
Class Guid

java.lang.Object
  extended by com.compoze.collab.util.Guid

public class Guid
extends Object


Method Summary
static byte[] getGuid()
          Gets a random GUID (using insecure random number generation favoring higher performance).
static byte[] getGuid(boolean bSecure)
          Gets a random GUID.
static String getGuidString(boolean bSecure, boolean bIncludeDashes)
          Gets a GUID in string form.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGuid

public static byte[] getGuid()
Gets a random GUID (using insecure random number generation favoring higher performance).

Returns
the GUID (not null and the size of an MD5 digest- 128 bits, or 16 bytes)

getGuid

public static byte[] getGuid(boolean bSecure)
Gets a random GUID.

Parameters
bSecure - if true, use cryptographically strong random number generation, else use the standard Random class to generate numbers
Returns
the GUID (not null and the size of an MD5 digest- 128 bits, or 16 bytes)

getGuidString

public static String getGuidString(boolean bSecure,
                                   boolean bIncludeDashes)
Gets a GUID in string form.

Parameters
bSecure - if true, use cryptographically strong random number generation, else use the standard Random class to generate numbers
bIncludeDashes - if true, include dashes in the string
Returns
the GUID (for example, C2FEEEAC-CFCD-11D1-8B05-00600806D9B6, or C2FEEEACCFCD11D18B0500600806D9B6 depending on whether or not dashes are included)

main

public static void main(String[] args)
                 throws Throwable
Throws
Throwable


Copyright © 2006 BEA Systems, Inc. All Rights Reserved