SshKnownHosts.parse
Parses known_hosts contents strictly.
Parameters
contents | The 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.