Check if install code (little-endian) is valid, and if not, and requested, fix it.
WARNING: Due to conflicting sizes between 8-length code with invalid CRC, and 10-length code missing CRC, given 8-length codes are always assumed to be 8-length code with invalid CRC (most probable scenario).
Parameters
code: Buffer
The code to check. Reference is not modified by this procedure but is returned when code was valid, as outCode.
Optionaladjust: boolean
If false, throws if the install code is invalid, otherwise try to fix it (CRC)
Check if install code (little-endian) is valid, and if not, and requested, fix it.
WARNING: Due to conflicting sizes between 8-length code with invalid CRC, and 10-length code missing CRC, given 8-length codes are always assumed to be 8-length code with invalid CRC (most probable scenario).