Anonymous avatar Anonymous committed 49977f4

hachoir-core/field/integer: allow bigger integers (useful when e.g. parsing RSA keys)

Comments (0)

Files changed (1)

hachoir-core/hachoir_core/field/integer.py

     Generic integer class used to generate other classes.
     """
     def __init__(self, parent, name, signed, size, description=None):
-        if not (8 <= size <= 256):
-            raise FieldError("Invalid integer size (%s): have to be in 8..256" % size)
+        if not (8 <= size <= 16384):
+            raise FieldError("Invalid integer size (%s): have to be in 8..16384" % size)
         Bits.__init__(self, parent, name, size, description)
         self.signed = signed
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.