-- Mock implementation of resty.string for testing local str = {} function str.to_hex(binary) local hex = {} for i = 1, #binary do table.insert(hex, string.format("%02x", string.byte(binary, i))) end return table.concat(hex) end return str