Add __repr__ for Curve object

pull/178/head
tuxxy 2018-07-06 23:12:23 -06:00
parent a717a87384
commit 4a20ef0692
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,9 @@ class Curve:
def __eq__(self, other):
return self.curve_nid == other.curve_nid
def __repr__(self):
return "<OpenSSL Curve w/ NID {}>".format(self.curve_nid)
SECP256R1 = Curve(_AVAIL_CURVES['secp256r1'])
SECP256K1 = Curve(_AVAIL_CURVES['secp256k1'])