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 | 2c8b958b07003c2afba9a483f05790ff3ef39cef (patch) | |
tree | f8047bc5f26c180e0ebb9dc662d8558a278aaf59 /util/uuid.lua | |
parent | 768cef78e233f2f613799dba6b525bdf8f7ca75c (diff) | |
download | prosody-2c8b958b07003c2afba9a483f05790ff3ef39cef.tar.gz prosody-2c8b958b07003c2afba9a483f05790ff3ef39cef.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() |