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/rsakey.py | |
parent | fdc09c9f93fd189a6398d5b350a3c91011d9b4cb (diff) | |
parent | 842caba00262a81975cbfd186b846c83f72354e3 (diff) | |
download | paramiko-cf14b9ff3004b9c9316417cd657a77797675b628.tar.gz |
Merge branch 'master' into one-shot-methods
Diffstat (limited to 'paramiko/rsakey.py')
-rw-r--r-- | paramiko/rsakey.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/paramiko/rsakey.py b/paramiko/rsakey.py index 8953a626..a457a121 100644 --- a/paramiko/rsakey.py +++ b/paramiko/rsakey.py @@ -90,10 +90,8 @@ class RSAKey(PKey): return self.asbytes().decode('utf8', errors='ignore') def __hash__(self): - h = hash(self.get_name()) - h = h * 37 + hash(self.public_numbers.e) - h = h * 37 + hash(self.public_numbers.n) - return hash(h) + return hash((self.get_name(), self.public_numbers.e, + self.public_numbers.n)) def get_name(self): return 'ssh-rsa' @@ -155,7 +153,7 @@ class RSAKey(PKey): generate a new host key or authentication key. :param int bits: number of bits the generated key should be. - :param function progress_func: Unused + :param progress_func: Unused :return: new `.RSAKey` private key """ key = rsa.generate_private_key( |