
  * Copyright ( C ) 2006 - 2009 Citrix Systems Inc. 
  * 
  * This program is free software ; you can redistribute it and/or modify 
  * it under the terms of the GNU Lesser General Public License as published 
  * by the Free Software Foundation ; version 2.1 only . with the special 
  * exception on linking described in file LICENSE . 
  * 
  * This program is distributed in the hope that it will be useful , 
  * but WITHOUT ANY WARRANTY ; without even the implied warranty of 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .   See the 
  * GNU Lesser General Public License for more details . 
 
 * Copyright (C) 2006-2009 Citrix Systems Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; version 2.1 only. with the special
 * exception on linking described in file LICENSE.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *)
* Type - safe UUIDs . 
     Probably need to refactor this ; UUIDs are used in two places : 
     + to uniquely name things across the cluster 
     + as secure session IDs 

     There is the additional constraint that current Xen tools use 
     a particular format of UUID ( the 16 byte variety generated by fresh ( ) ) 

    	 Also , cookies are n't UUIDs and should be put somewhere else . 

    Probably need to refactor this; UUIDs are used in two places:
    + to uniquely name things across the cluster
    + as secure session IDs

    There is the additional constraint that current Xen tools use 
    a particular format of UUID (the 16 byte variety generated by fresh ())

    	Also, cookies aren't UUIDs and should be put somewhere else.
*)

* A 128 - bit UUID .   Using phantom types ( ' a ) to achieve the requires type - safety .
type 'a t

val make_uuid : unit -> 'a t
(** Create a fresh UUID *)

val make_uuid_prng : unit -> 'a t

val make_uuid_urnd : unit -> 'a t

val make_uuid_rnd : unit -> 'a t

val of_string : string -> 'a t
(** Create a UUID from a string. *)

val to_string : 'a t -> string
(** Marshal a UUID to a string. *)

val null : 'a t
(** A null UUID, as if such a thing actually existed.  It turns out to be
 * useful though. *)

val uuid_of_string : string -> 'a t
(** Deprecated alias for {! Uuid.of_string} *)

val string_of_uuid : 'a t -> string
(** Deprecated alias for {! Uuid.to_string} *)

val uuid_of_int_array : int array -> 'a t
(** Convert an array to a UUID. *)

val int_array_of_uuid : 'a t -> int array
(** Convert a UUID to an array. *)

val is_uuid : string -> bool
(** Check whether a string is a UUID. *)

* A 512 - bit cookie .
type cookie

val make_cookie : unit -> cookie

val cookie_of_string : string -> cookie

val string_of_cookie : cookie -> string

* Create a fresh UUID 
* Create a UUID from a string. 
* Marshal a UUID to a string. 
* A null UUID, as if such a thing actually existed.  It turns out to be
 * useful though. 
* Deprecated alias for {! Uuid.of_string} 
* Deprecated alias for {! Uuid.to_string} 
* Convert an array to a UUID. 
* Convert a UUID to an array. 
* Check whether a string is a UUID. 

  * Copyright ( C ) 2006 - 2009 Citrix Systems Inc. 
  * 
  * This program is free software ; you can redistribute it and/or modify 
  * it under the terms of the GNU Lesser General Public License as published 
  * by the Free Software Foundation ; version 2.1 only . with the special 
  * exception on linking described in file LICENSE . 
  * 
  * This program is distributed in the hope that it will be useful , 
  * but WITHOUT ANY WARRANTY ; without even the implied warranty of 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .   See the 
  * GNU Lesser General Public License for more details . 
 
 * Copyright (C) 2006-2009 Citrix Systems Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; version 2.1 only. with the special
 * exception on linking described in file LICENSE.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *)
* Type - safe UUIDs . 
     Probably need to refactor this ; UUIDs are used in two places : 
     + to uniquely name things across the cluster 
     + as secure session IDs 

     There is the additional constraint that current Xen tools use 
     a particular format of UUID ( the 16 byte variety generated by fresh ( ) ) 

    	 Also , cookies are n't UUIDs and should be put somewhere else . 

    Probably need to refactor this; UUIDs are used in two places:
    + to uniquely name things across the cluster
    + as secure session IDs

    There is the additional constraint that current Xen tools use 
    a particular format of UUID (the 16 byte variety generated by fresh ())

    	Also, cookies aren't UUIDs and should be put somewhere else.
*)

* A 128 - bit UUID .   Using phantom types ( ' a ) to achieve the requires type - safety .
type 'a t

val make_uuid : unit -> 'a t

val make_uuid_prng : unit -> 'a t

val make_uuid_urnd : unit -> 'a t

val make_uuid_rnd : unit -> 'a t

val of_string : string -> 'a t

val to_string : 'a t -> string

val null : 'a t

val uuid_of_string : string -> 'a t

val string_of_uuid : 'a t -> string

val uuid_of_int_array : int array -> 'a t

val int_array_of_uuid : 'a t -> int array

val is_uuid : string -> bool

* A 512 - bit cookie .
type cookie

val make_cookie : unit -> cookie

val cookie_of_string : string -> cookie

val string_of_cookie : cookie -> string
