Skip to main content
Version: Next

encode_hex

Encodes bytes into their hexadecimal representation.

encode_hex(bytes: blob|string) -> string

Description

Encodes bytes into their hexadecimal representation.

bytes: blob|string

The value to encode.

Examples

Encode a string to hex

from {bytes: "Tenzir"}
encoded = bytes.encode_hex()
{bytes: "Tenzir", encoded: "54656E7A6972"}

See Also

decode_hex