Code: Select all
>>> myHash
b'\x93\x1d\x93HP\xf6,.2\x856\x0e\t\x80\xed\xd9\xaf\rc\xff\xbb9\xf6~\xa8\xca\xea\x9ca\xf2\xbd\xd4'
Code: Select all
>>> isinstance(myHash, str)
False
Code: Select all
>>> print("0x{:02X}".format(myHash))
Traceback (most recent call last):
File "<stdin>", in <module>
ValueError: '=' alignment not allowed in string format specifier
I seem to make some progress if I hexlify it:
Code: Select all
>>> import ubinascii
>>> hexHash=ubinascii.hexlify(myHash)
>>> hexHash
b'931d934850f62c2e3285360e0980edd9af0d63ffbb39f67ea8caea9c61f2bdd4'