Skip to content

Commit

Permalink
make variable names in remove_integer more aproppriate
Browse files Browse the repository at this point in the history
backport of 710e7c8
  • Loading branch information
tomato42 committed Oct 7, 2019
1 parent 14abfe0 commit 563d2ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ecdsa/der.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def remove_integer(string):
raise UnexpectedDER("0-byte long encoding of integer")
numberbytes = string[1+llen:1+llen+length]
rest = string[1+llen+length:]
nbytes = numberbytes[0] if isinstance(numberbytes[0], integer_types) \
msb = numberbytes[0] if isinstance(numberbytes[0], integer_types) \
else ord(numberbytes[0])
if not nbytes < 0x80:
if not msb < 0x80:
raise UnexpectedDER("Negative integers are not supported")
return int(binascii.hexlify(numberbytes), 16), rest

Expand Down

0 comments on commit 563d2ee

Please sign in to comment.