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

Fix Bigint.pack for odd-length hex integers #58

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

yunzheng
Copy link
Contributor

@yunzheng yunzheng commented Feb 4, 2021

This fixes the following error when you bigint.pack() an integer that has an odd-length hex string, such as 1 or 1234 (0x4d2).

    def unhex(s: Union[str, bytes]) -> bytes:
>       return binascii.unhexlify(s)
E       binascii.Error: Odd-length string

@nazywam nazywam self-requested a review March 3, 2021 12:06
Copy link
Member

@nazywam nazywam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@nazywam nazywam merged commit e2f28b0 into CERT-Polska:master Mar 4, 2021
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

Successfully merging this pull request may close these issues.

2 participants