summaryrefslogtreecommitdiff
path: root/paramiko/hostkeys.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <jbouse@debian.org>2015-03-12 21:35:58 -0400
committerJeremy T. Bouse <jbouse@debian.org>2015-03-12 21:35:58 -0400
commitf784a533d6e1d09e89dc254f3493b491e19c94f0 (patch)
tree6079fb034538b346b999a6fefcae4b1c557713c5 /paramiko/hostkeys.py
parent941814e1efaf9a46992476e50badcecbcbfc9a41 (diff)
downloadpython-paramiko-f784a533d6e1d09e89dc254f3493b491e19c94f0.tar
python-paramiko-f784a533d6e1d09e89dc254f3493b491e19c94f0.tar.gz
Imported 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):
"""