Files
chipsec-chipsec/chipsec/modules
Nicolas Iooss e8d41ab9ee Replace binascii.hexlify with bytes.hex
Python 3.5 introduced `bytes.hex` to represent bytes in hexadecimal:
https://docs.python.org/3.5/library/stdtypes.html#bytes.hex

This function directly returns a string, contrary to `binascii.hexlify`
which returns bytes. Using `binascii.hexlify` without transforming the
output to string actually produced buggy output. For example:

    $ ./chipsec_util.py spidesc spi_rom.bin
    ...
    + 0x0000 Reserved : 0xb'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'

This `b'` is not desired. Using `bytes.hex` fixes this issue and makes
the code simpler.

Signed-off-by: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
2023-06-05 16:43:15 -07:00
..