mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
e8d41ab9ee
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>