diff options
author | Brian Warner <warner@lothar.com> | 2016-01-21 16:57:20 -0800 |
---|---|---|
committer | Brian Warner <warner@lothar.com> | 2016-01-21 16:57:20 -0800 |
commit | dda9e5b327389be6d48da2f60eb97fcd81aefcbc (patch) | |
tree | 89fa35fa1f939dfb69d8bea243d4ca033ff900ea /ecdsa/ellipticcurve.py | |
parent | bf69254a704dc37f1a9adce1313cc9e3ca27b655 (diff) | |
download | ecdsa-pr45.tar.gz |
CurveFp needs __str__ nowpr45
Diffstat (limited to 'ecdsa/ellipticcurve.py')
-rw-r--r-- | ecdsa/ellipticcurve.py | 2 |
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, |