c,python: Use little-endina byte order for bigint arithmetics
This better matches what one would expect from the hex or base64 (upcoming) formats.
This commit is contained in:
@ -21,7 +21,7 @@ class Bhash:
|
||||
"""
|
||||
Initialize a Bhash from a bytes object
|
||||
"""
|
||||
self.bhash = int.from_bytes(buf, byteorder='big')
|
||||
self.bhash = int.from_bytes(buf, byteorder='little')
|
||||
self.bits_avail = len(buf) * 8
|
||||
self.bits_used = 0.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user