FUNCTION

byte_array.from_hex

purestatic function from_hex(value: text): byte_array

Create a byte array from a hexadecimal string.

The given hexadecimal string must have even length, since two hexadecimal characters encode one byte.

Parameters

  • value — the hexadecimal string

Throws

  • exception — if value has odd length or contains invalid characters

Since

0.9.0

© 2026 Chromia