Module hex_util

Source
Expand description

Hex string helpers.

Functions§

common_hex_len
Calculates common prefix length of two byte sequences. The length to be returned is a number of hexadecimal digits.
decode_hex
Decodes hex as normal hex string.
decode_hex_prefix
Decodes hex as normal hex string prefix. The output may have odd-length byte. Returns (bytes, has_odd_byte).
decode_reverse_hex
Decodes reverse_hex as hex string using z-k “digits”.
decode_reverse_hex_prefix
Decodes reverse_hex as hex string prefix using z-k “digits”. The output may have odd-length byte. Returns (bytes, has_odd_byte).
encode_hex
Encodes data as normal hex string.
encode_reverse_hex
Encodes data as hex string using z-k “digits”.