diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/ec.py | 6 |
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 eda7df0c..907a6358 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/ec.py +++ b/src/cryptography/hazmat/primitives/asymmetric/ec.py @@ -302,6 +302,9 @@ class EllipticCurvePublicNumbers(object): def __ne__(self, other): return not self == other + def __hash__(self): + return hash((self.x, self.y, self.curve.name, self.curve.key_size)) + def __repr__(self): return ( "<EllipticCurvePublicNumbers(curve={0.curve.name}, x={0.x}, " @@ -341,6 +344,9 @@ class EllipticCurvePrivateNumbers(object): def __ne__(self, other): return not self == other + def __hash__(self): + return hash((self.private_value, self.public_numbers)) + class ECDH(object): pass |