Module util

Source
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 u8s, uses a bit shift operation and a binary OR operation to return a u16. The first 8 bits of this u16 are those of the argument first, while the second 8 bits are those of the argument second.
u8s_to_u32
A utility function that, given four u8s, uses a bit shift operation and a binary OR operation to return a u32. The first 8 bits of this u32 are those of the argument first, the second 8 bits are those of the argument second, the third eight bits from third, and the final 8 bits from fourth.