Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry::length is not applied during encoding #15

Open
kvaellning opened this issue Apr 11, 2022 · 1 comment
Open

Entry::length is not applied during encoding #15

kvaellning opened this issue Apr 11, 2022 · 1 comment

Comments

@kvaellning
Copy link
Contributor

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
jlusiardi pushed a commit that referenced this issue Apr 12, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixes issue #15

Signed-off-by: Robert Schulze <[email protected]>

Co-authored-by: Robert Schulze <[email protected]>
@jlusiardi
Copy link
Owner

Thanks a lot, release is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants