t.c.c.k.HashedEntry(_BaseEntry) : class documentation

Part of twisted.conch.client.knownhosts View Source View In Hierarchy

Implements interfaces: twisted.conch.interfaces.IKnownHostEntry

A HashedEntry is a representation of an entry in a known_hosts file where the hostname has been hashed and salted.
Instance Variables_hostSaltthe salt to combine with a hostname for hashing.
_hostHashthe hashed representation of the hostname.
Class VariablesMAGICthe 'hash magic' string used to identify a hashed line in a known_hosts file as opposed to a plaintext one.
Method __init__ Undocumented
Class Method fromString Load a hashed entry from a string representing a line in a known_hosts file.
Method matchesHost Implement IKnownHostEntry.matchesHost to compare the hash of the input to the stored hash.
Method toString Implement IKnownHostEntry.toString by base64-encoding the salt, host hash, and key.

Inherited from _BaseEntry:

Method matchesKey Check to see if this entry matches a given key object.
def __init__(self, hostSalt, hostHash, keyType, publicKey, comment): (source)
Undocumented
@classmethod
def fromString(cls, string): (source)
Load a hashed entry from a string representing a line in a known_hosts file.
RaisesDecodeErrorif the key, the hostname, or the is not valid encoded as valid base64
InvalidEntryif the entry does not have the right number of elements and is therefore invalid, or the host/hash portion contains more items than just the host and hash.
BadKeyErrorif the key, once decoded from base64, is not actually an SSH key.
def matchesHost(self, hostname): (source)
Implement IKnownHostEntry.matchesHost to compare the hash of the input to the stored hash.
def toString(self): (source)
Implement IKnownHostEntry.toString by base64-encoding the salt, host hash, and key.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.