SshKnownHosts.parse

SshKnownHosts parse(string contents) static @safe

Parses known_hosts contents strictly.

Parameters

contentsThe whole file contents.

Returns

The parsed database.

Throws

SshKeyException on malformed lines or size violations;

callers treat this as a fail-closed condition.

Entries whose key type has no enabled public-data parser (see isParsedSshPublicKeyAlgorithm) are skipped; a file containing only such entries parses to an empty database.