ehn-dcc-development / ehn-sign-verify-python-trivial

Extremely minimal python implementation of the eHN-S protocol.
European Union Public License 1.2
76 stars 41 forks source link

IndexError: index out of range #25

Open adegams opened 2 years ago

adegams commented 2 years ago

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

Scahry commented 2 years ago

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 commented 2 years ago

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')`