diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-06 03:28:31 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-06 03:28:31 +0100 |
commit | c515c93724a691a3fdbcc97e7684c09fbeaa338f (patch) | |
tree | f8047bc5f26c180e0ebb9dc662d8558a278aaf59 /util/uuid.lua | |
parent | 3937d883586e89b5dd6c0da332bf290158a6ecb1 (diff) | |
download | prosody-c515c93724a691a3fdbcc97e7684c09fbeaa338f.tar.gz prosody-c515c93724a691a3fdbcc97e7684c09fbeaa338f.zip |
util.uuid: Take random byte directly instead of the low bits from the ascii value of a hex nibble
Diffstat (limited to 'util/uuid.lua')
-rw-r--r-- | util/uuid.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/uuid.lua b/util/uuid.lua index e10fc0f7..f4fd21f6 100644 --- 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_nibbles(1):byte() % 4 + 8); + return ("%x"):format(random_bytes(1):byte() % 4 + 8); end local function generate() |