module Uuidm:Universally unique identifiers.sig..end
Uuidm implements 128 bits universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122.
Random numbers are generated using OCaml's Random module with a
private state initialized by Random.State.make_self_init.
Version 0.9.3 - daniel.buenzl i@erratique.ch
References
P. Leach et al. A universally unique identifier (UUID) URN Namespace, 2005.
type t
typeversion =[ `V3 of t * string | `V4 | `V5 of t * string ]
`V3 and `V5
specify a namespace and a name for the generation.val nil : tnil is the nil UUID.val ns_dns : tns_dns is the DNS namespace UUID.val ns_url : tns_url is the URL namespace UUID.val ns_oid : tns_oid is the ISO OID namespace UUID.val ns_X500 : tns_dn is the X.500 DN namespace UUID.val create : version -> tcreate version is an UUID of the given version.val compare : t -> t -> intval equal : t -> t -> boolequal u u' is true iff u and u' are equal.val of_bytes : ?pos:int -> string -> t optionof_bytes pos s is the UUID represented by the 16 bytes starting
at pos in s (pos defaults to 0). Returns None if the
string is not long enough.val to_bytes : t -> stringto_bytes u is u as a 16 bytes long string.val of_string : ?pos:int -> string -> t optionof_string pos s converts the substring of s starting at pos
(defaults to 0) of the form "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
where X is a lower or upper case hexadecimal number to an
UUID. Returns None if a parse error occured.val to_string : ?upper:bool -> t -> stringto_string u is u as a string of the form
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" where X is
a lower case hexadecimal number (or upper if upper is
true).val print : ?upper:bool -> Format.formatter -> t -> unitUuidm.to_string.