Found out that I need to specify a specific length for an integer. From the documentation this appears to be the case by passing the length argument to the constructor of Entry. Unfortunately, length is not honored on encoding.
Repro:
import tlv8
entry = tlv8.Entry(42, 1, length=8)
print(entry.encode().hex() # 2a 01 01, expected 2a 08 01 00 00 00 00 00 00 00
Found out that I need to specify a specific length for an integer. From the documentation this appears to be the case by passing the
lengthargument to the constructor ofEntry. Unfortunately,lengthis not honored on encoding.Repro: