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 constant time comparison #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

williamgibb
Copy link

Update utils.py to define two different constant time comparisons; one which is appropriate for use w/ Python2 and one which is appropriate for use with Python3. Unit tests were previously failing on python3, and no longer fail with this update.

The algorithm is the same between the two of them, differing in the use of ord(), which fails on ints which are present in python3 when iterating over the bytes class. This fixes #19.

…e which is appropriate for use w/ Python2 and one which is appropriate for use with Python3. Unit tests were previously failing on python3, and no longer fail with this update.
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.

unit tests fail for python3
1 participant