diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-06-25 20:47:34 -1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-25 20:47:34 -1000 |
commit | cf14b9ff3004b9c9316417cd657a77797675b628 (patch) | |
tree | 523656d9d9c820cd3023bf89132e33c732cfa555 /paramiko/ecdsakey.py | |
parent | fdc09c9f93fd189a6398d5b350a3c91011d9b4cb (diff) | |
parent | 842caba00262a81975cbfd186b846c83f72354e3 (diff) | |
download | paramiko-cf14b9ff3004b9c9316417cd657a77797675b628.tar.gz |
Merge branch 'master' into one-shot-methods
Diffstat (limited to 'paramiko/ecdsakey.py')
-rw-r--r-- | paramiko/ecdsakey.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py index b13b9a3c..1add88bd 100644 --- a/paramiko/ecdsakey.py +++ b/paramiko/ecdsakey.py @@ -165,10 +165,8 @@ class ECDSAKey(PKey): return self.asbytes() def __hash__(self): - h = hash(self.get_name()) - h = h * 37 + hash(self.verifying_key.public_numbers().x) - h = h * 37 + hash(self.verifying_key.public_numbers().y) - return hash(h) + return hash((self.get_name(), self.verifying_key.public_numbers().x, + self.verifying_key.public_numbers().y)) def get_name(self): return self.ecdsa_curve.key_format_identifier @@ -227,7 +225,7 @@ class ECDSAKey(PKey): Generate a new private ECDSA key. This factory function can be used to generate a new host key or authentication key. - :param function progress_func: Not used for this type of key. + :param progress_func: Not used for this type of key. :returns: A new private key (`.ECDSAKey`) object """ if bits is not None: |