local Util = {} function Util.valueToHex(value) local collect = {} while value > 0 do local idx = value % 16 table.insert(collect, 1, ("0123456789ABCDEF"):sub(idx, idx)) value = bit.brshift(value, 4) end return table.concat(collect) end return Util