aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-10-27 23:48:45 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-10-27 23:48:45 -0400
commit064d02bd2cf79a958f210bd7aa0a70e426fadba5 (patch)
tree554457c88ab260fa90b27f8f1825820783f9cb05 /src
parentd3f4ecdbefe20f4f9cb8b74701c5757557e476e1 (diff)
parent4ef99da4918d37ce34890c78a34f28755cb34ef7 (diff)
downloadcryptography-064d02bd2cf79a958f210bd7aa0a70e426fadba5.tar.gz
cryptography-064d02bd2cf79a958f210bd7aa0a70e426fadba5.tar.bz2
cryptography-064d02bd2cf79a958f210bd7aa0a70e426fadba5.zip
Merge pull request #2450 from reaperhulk/numbers-repr
add ellipticcurvepublicnumbers repr
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/ec.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/ec.py b/src/cryptography/hazmat/primitives/asymmetric/ec.py
index 7782133c..eda7df0c 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/ec.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/ec.py
@@ -302,6 +302,12 @@ class EllipticCurvePublicNumbers(object):
def __ne__(self, other):
return not self == other
+ def __repr__(self):
+ return (
+ "<EllipticCurvePublicNumbers(curve={0.curve.name}, x={0.x}, "
+ "y={0.y}>".format(self)
+ )
+
class EllipticCurvePrivateNumbers(object):
def __init__(self, private_value, public_numbers):