Encodes a buffer into a lowercase hexadecimal string.
@eryx/encoding/hex Module
Hexadecimal encoding utilities.
Encodes binary buffer data into lowercase hexadecimal strings and
decodes hex strings back into buffers. Both uppercase and lowercase
hex digits are accepted when decoding.
local hex = require("@eryx/encoding/hex")
local encoded = hex.encode(buffer.fromstring("\xff\x0a"))
print(encoded) -- "ff0a"
Summary
Functions
API Reference
Functions
hex.encode
Parameters
The binary data to encode.
Returns
The hex-encoded string (always lowercase).