ehn-sign-verify-python-trivial icon indicating copy to clipboard operation
ehn-sign-verify-python-trivial copied to clipboard

IndexError: index out of range

Open adegams opened this issue 3 years ago • 2 comments

Traceback (most recent call last): File "./hc1_verify.py", line 155, in if (cin[0] == 0x78): IndexError: index out of range

adegams avatar Jan 30 '22 05:01 adegams

was this while trying echo '{"A": 1234}' | python3.8 hc1_sign.py | python3.8 hc1_verify.py ? if so try replacing line 149 in hc1_sign.py with this one out = b'HC1:' + bytes(b45encode(out),"utf8").decode().encode('ascii')

Scahry avatar Jun 01 '22 13:06 Scahry

update: base45 encoding seems to be different on windows and linux thats the variation that works for both if platform == "win32" : out = b'HC1:' + b45encode(out).decode().encode('ascii') #linux else: out = b'HC1:' + bytes(b45encode(out),"utf8").decode().encode('ASCII')

Scahry avatar Jul 13 '22 18:07 Scahry