Skip to main content

Module hex

Module hex 

Source
Expand description

Lowercase hex encoding, and decoding that takes either case, an optional 0x or 0X prefix and surrounding whitespace.

Enums§

BadHex
Why text did not decode as hex.

Functions§

decode
Decodes hex into a fresh vector, 0x prefix and whitespace optional.
decode_array
Decodes hex into exactly N bytes; 0x prefix and whitespace optional.
decode_into
Decodes hex into out, which it must fill exactly; 0x prefix and whitespace optional.
encode
The bytes as lowercase hex, two digits each, with no prefix.
encode_prefixed
The bytes as lowercase hex with a 0x prefix.