Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`conch`.`client`.`knownhosts``

module documentation
(source)

An implementation of the OpenSSH known_hosts database.

Present Since
8.2

Class | `ConsoleUI` | A UI object that can ask true/false questions and post notifications on the console, to be used during key verification.
Class | `HashedEntry` | A `HashedEntry` is a representation of an entry in a known_hosts file where the hostname has been hashed and salted.
Class | `KnownHostsFile` | A structured representation of an OpenSSH-format ~/.ssh/known_hosts file.
Class | `PlainEntry` | A `PlainEntry` is a representation of a plain-text entry in a known_hosts file.
Class | `UnparsedEntry` | `UnparsedEntry` is an entry in a `KnownHostsFile` which can't actually be parsed; therefore it matches no keys and no hosts.
Variable | `log` | Undocumented
Class | `_BaseEntry` | Abstract base of both hashed and non-hashed entry objects, since they represent keys and key types the same way.
Function | `_b64encode` | Encode a binary string as base64 with no trailing newline.
Function | `_extractCommon` | Extract common elements of base64 keys from an entry in a hosts file.
Function | `_hmacedString` | Return the SHA-1 HMAC hash of the given key and string.

log = (source)

Undocumented

def _b64encode(s): (source)

Encode a binary string as base64 with no trailing newline.

Parameters
s:`bytes` | The string to encode.
Returns
`bytes` | The base64-encoded string.

def _extractCommon(string): (source)

Extract common elements of base64 keys from an entry in a hosts file.

Parameters
string:`bytes` | A known hosts file entry (a single line).
Returns
`tuple` | a 4-tuple of hostname data (`bytes`), ssh key type (`bytes`), key (`Key`), and comment (`bytes` or `None`). The hostname data is simply the beginning of the line up to the first occurrence of whitespace.

def _hmacedString(key, string): (source)

Return the SHA-1 HMAC hash of the given key and string.

Parameters
key:`bytes` | The HMAC key.
string:`bytes` | The string to be hashed.
Returns
`bytes` | The keyed hash value.