Merge 0.10->trunk
[prosody.git] / util / uuid.lua
index e10fc0f72290a996c09560632e4c94603dff74fb..f4fd21f64ec72b9fc3e45f2973c9a1d9d9fabeff 100644 (file)
@@ -16,7 +16,7 @@ local function get_nibbles(n)
 end
 
 local function get_twobits()
-       return ("%x"):format(get_nibbles(1):byte() % 4 + 8);
+       return ("%x"):format(random_bytes(1):byte() % 4 + 8);
 end
 
 local function generate()