Skip to main content

Module hex

Module hex 

Source
Expand description

§Hex encoding/decoding utilities

Efficient bidirectional conversion between dodecets and hex strings.

Functions§

decode
Decode a hex string to a vector of dodecets
decode_dodecet
Decode 3 hex characters to a single dodecet
dodecet_count
Calculate the number of dodecets in a hex string
encode
Encode a slice of dodecets to a hex string
encode_dodecet
Encode a single dodecet to 3 hex characters
equal_ignore_case
Compare two hex strings for equality (case-insensitive)
format_spaced
Format a hex string with spacing for readability
hex_view
Create a hex editor-friendly view
is_valid
Validate a hex string for dodecet encoding
remove_spaces
Remove spaces from a spaced hex string
to_lowercase
Convert hex string to lowercase
to_uppercase
Convert hex string to uppercase
xor
XOR two hex strings of equal length