# HG changeset patch # User Kim Alvefur # Date 1452047311 -3600 # Node ID 0eee56075901433f5a32d06f09a79c2fe6d436fd # Parent 9ca2b720ad433ece3f61c4d75f612fe761023f55 util.uuid: Take random byte directly instead of the low bits from the ascii value of a hex nibble diff -r 9ca2b720ad43 -r 0eee56075901 util/uuid.lua --- a/util/uuid.lua Mon Jan 04 09:14:30 2016 +0000 +++ b/util/uuid.lua Wed Jan 06 03:28:31 2016 +0100 @@ -16,7 +16,7 @@ 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()