org.exist.security
Class UUIDGenerator

java.lang.Object
  extended by org.exist.security.UUIDGenerator

public class UUIDGenerator
extends Object

UUID or GUID generator. The random code is generated by java's UUID-class.

Author:
Dannes Wessels

Constructor Summary
UUIDGenerator()
           
 
Method Summary
static String getUUID()
          Generate random UUID code.
static String getUUIDversion3(String value)
          Return version 3 UUID code (derived from value).
static String getUUIDversion4()
          Return version 4 UUID code (random).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUIDGenerator

public UUIDGenerator()
Method Detail

getUUID

public static String getUUID()
Generate random UUID code.

Returns:
UUID code, formatted as f271ec43-bf1f-4030-a269-b11576538f71

getUUIDversion4

public static String getUUIDversion4()
Return version 4 UUID code (random). Check Wikipedia


getUUIDversion3

public static String getUUIDversion3(String value)
Return version 3 UUID code (derived from value). Check Wikipedia

Parameters:
value - Initialization value.


Copyright (C) Wolfgang Meier. All rights reserved.