Skip to content

Hex

The hexadecimal encoding and decoding functions are provided under the crypt.hex namespace.


encode

function crypt.hex.encode(data: string): string

Encodes data to hexadecimal representation.

Example

local hex_encoded = crypt.hex.encode("Hello World")

decode

function crypt.hex.decode(hex_string: string): string

Decodes hexadecimal encoded data.

Example

local decoded = crypt.hex.decode(hex_encoded)