We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I saw that the code for Crypto.Util.number.size is:
def size (N): """Returns the size of the number N in bits.""" bits = 0 while N >> bits: bits += 1 return bits
How about: return N.bit_length() ?
return N.bit_length()
The text was updated successfully, but these errors were encountered:
Good point. This size function is a left-over from Python 2.6 and older, which are not supported anymore.
size
Sorry, something went wrong.
I just made pull request #484 that addresses this issue and does two more improvements.
Fixed with a31d163
No branches or pull requests
I saw that the code for Crypto.Util.number.size is:
How about:
return N.bit_length()
?
The text was updated successfully, but these errors were encountered: