projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d510d25
)
util.uuid: Take random byte directly instead of the low bits from the ascii value...
author
Kim Alvefur
<zash@zash.se>
Wed, 6 Jan 2016 02:28:31 +0000
(
03:28
+0100)
committer
Kim Alvefur
<zash@zash.se>
Wed, 6 Jan 2016 02:28:31 +0000
(
03:28
+0100)
util/uuid.lua
patch
|
blob
|
history
diff --git
a/util/uuid.lua
b/util/uuid.lua
index e10fc0f72290a996c09560632e4c94603dff74fb..f4fd21f64ec72b9fc3e45f2973c9a1d9d9fabeff 100644
(file)
--- a/
util/uuid.lua
+++ b/
util/uuid.lua
@@
-16,7
+16,7
@@
local function get_nibbles(n)
end
local function get_twobits()
- return ("%x"):format(
get_nibbl
es(1):byte() % 4 + 8);
+ return ("%x"):format(
random_byt
es(1):byte() % 4 + 8);
end
local function generate()