Expand description
This module defines several low-level utility functions for general use by ArmorLib. You can use these functions in your own program, but they are designed for internal use.
Functionsยง
- hex_
to_ vec - A utility function that converts a string of space-separated hexadecimal bytes into a
Vec<u8>
for use by preprocessors, scan modules, and other programs. - u8s_
to_ u16 - A utility function that, given two
u8
s, uses a bit shift operation and a binaryOR
operation to return au16
. The first 8 bits of thisu16
are those of the argumentfirst
, while the second 8 bits are those of the argumentsecond
. - u8s_
to_ u32 - A utility function that, given four
u8
s, uses a bit shift operation and a binaryOR
operation to return au32
. The first 8 bits of thisu32
are those of the argumentfirst
, the second 8 bits are those of the argumentsecond
, the third eight bits fromthird
, and the final 8 bits fromfourth
.