summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Warner <warner@lothar.com>2016-01-21 16:57:20 -0800
committerBrian Warner <warner@lothar.com>2016-01-21 16:57:20 -0800
commitdda9e5b327389be6d48da2f60eb97fcd81aefcbc (patch)
tree89fa35fa1f939dfb69d8bea243d4ca033ff900ea
parentbf69254a704dc37f1a9adce1313cc9e3ca27b655 (diff)
downloadecdsa-pr45.tar.gz
CurveFp needs __str__ nowpr45
-rw-r--r--ecdsa/ellipticcurve.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ecdsa/ellipticcurve.py b/ecdsa/ellipticcurve.py
index c83088f..0739807 100644
--- a/ecdsa/ellipticcurve.py
+++ b/ecdsa/ellipticcurve.py
@@ -59,6 +59,8 @@ class CurveFp(object):
"""Is the point (x,y) on this curve?"""
return (y * y - (x * x * x + self.__a * x + self.__b)) % self.__p == 0
+ def __str__(self):
+ return "CurveFp(p=%d, a=%d, b=%d)" % (self.__p, self.__a, self.__b)
class Point(object):
"""A point on an elliptic curve. Altering x and y is forbidding,