We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76833c8 commit 083e07eCopy full SHA for 083e07e
src/ecdsa/ecdsa.py
@@ -80,8 +80,13 @@ class RSZeroError(RuntimeError):
80
class InvalidPointError(RuntimeError):
81
pass
82
83
+if sys.version_info < (3, 0):
84
+ INT_TYPE = long
85
+else:
86
+ INT_TYPE = int
87
-class RValue(int):
88
+
89
+class RValue(INT_TYPE):
90
"""An r signature value that also carries the originating EC point.
91
92
Behaves as a regular ``int`` (equal to ``point.x() % order``) so
@@ -91,7 +96,7 @@ class RValue(int):
96
"""
97
93
98
def __new__(cls, r, point):
94
- obj = super(RValue, cls).__new__(cls, r)
99
+ obj = super(RValue, cls).__new__(cls, INT_TYPE(r))
95
100
obj.point = point
101
return obj
102
0 commit comments