summaryrefslogtreecommitdiff
path: root/paramiko/hostkeys.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <jbouse@debian.org>2015-03-12 21:35:59 -0400
committerJeremy T. Bouse <jbouse@debian.org>2015-03-12 21:35:59 -0400
commit01653e8710c38f3066078b2773ad47ccb3670c58 (patch)
tree8284e75857a06945167186d09dd9021fd24c2ee1 /paramiko/hostkeys.py
parent74794f84c2d9906aea5024dfccd90482fff9bab3 (diff)
parentf784a533d6e1d09e89dc254f3493b491e19c94f0 (diff)
downloadpython-paramiko-01653e8710c38f3066078b2773ad47ccb3670c58.tar
python-paramiko-01653e8710c38f3066078b2773ad47ccb3670c58.tar.gz
Merge tag 'upstream/1.15.2'
Upstream version 1.15.2
Diffstat (limited to 'paramiko/hostkeys.py')
-rw-r--r--paramiko/hostkeys.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py
index b94ff0d..8486887 100644
--- a/paramiko/hostkeys.py
+++ b/paramiko/hostkeys.py
@@ -255,6 +255,7 @@ class HostKeys (MutableMapping):
ret.append(self.lookup(k))
return ret
+ @staticmethod
def hash_host(hostname, salt=None):
"""
Return a "hashed" form of the hostname, as used by OpenSSH when storing
@@ -274,7 +275,6 @@ class HostKeys (MutableMapping):
hmac = HMAC(salt, b(hostname), sha1).digest()
hostkey = '|1|%s|%s' % (u(encodebytes(salt)), u(encodebytes(hmac)))
return hostkey.replace('\n', '')
- hash_host = staticmethod(hash_host)
class InvalidHostKey(Exception):
@@ -294,6 +294,7 @@ class HostKeyEntry:
self.hostnames = hostnames
self.key = key
+ @classmethod
def from_line(cls, line, lineno=None):
"""
Parses the given line of text to find the names for the host,
@@ -336,7 +337,6 @@ class HostKeyEntry:
raise InvalidHostKey(line, e)
return cls(names, key)
- from_line = classmethod(from_line)
def to_line(self):
"""