aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/primitives/asymmetric
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-06-03 20:37:24 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-06-03 20:37:24 -0700
commit815a24bf3415e18e467e6740c35ade0220002240 (patch)
tree6297d448d9db9347d9141bd552fee1b6866231bc /src/cryptography/hazmat/primitives/asymmetric
parent3c224b8ad7520ce8a521ef0094b86469363b8e87 (diff)
downloadcryptography-815a24bf3415e18e467e6740c35ade0220002240.tar.gz
cryptography-815a24bf3415e18e467e6740c35ade0220002240.tar.bz2
cryptography-815a24bf3415e18e467e6740c35ade0220002240.zip
added a repr to the dsa numbers classes (#2961)
* added a repr to the dsa numbers classes * fix * another test
Diffstat (limited to 'src/cryptography/hazmat/primitives/asymmetric')
-rw-r--r--src/cryptography/hazmat/primitives/asymmetric/dsa.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/dsa.py b/src/cryptography/hazmat/primitives/asymmetric/dsa.py
index 184177e0..511d3464 100644
--- a/src/cryptography/hazmat/primitives/asymmetric/dsa.py
+++ b/src/cryptography/hazmat/primitives/asymmetric/dsa.py
@@ -166,6 +166,13 @@ class DSAParameterNumbers(object):
def __ne__(self, other):
return not self == other
+ def __repr__(self):
+ return (
+ "<DSAParameterNumbers(p={self.p}, q={self.q}, g={self.g})>".format(
+ self=self
+ )
+ )
+
class DSAPublicNumbers(object):
def __init__(self, y, parameter_numbers):
@@ -198,6 +205,12 @@ class DSAPublicNumbers(object):
def __ne__(self, other):
return not self == other
+ def __repr__(self):
+ return (
+ "<DSAPublicNumbers(y={self.y}, "
+ "parameter_numbers={self.parameter_numbers})>".format(self=self)
+ )
+
class DSAPrivateNumbers(object):
def __init__(self, x, public_numbers):