Method HashHost
HashHost(string, int, ReadOnlySpan<byte>)
Creates a hashed host field (|1|salt|hash) for a host and port.
[SuppressMessage("Security", "CA5350", Justification = "HMAC-SHA1 is mandated by the OpenSSH hashed known_hosts format; it is not used for security of the connection.")]
public static string HashHost(string host, int port, ReadOnlySpan<byte> salt = default)
Parameters
hoststringThe host name or address.
portintThe port.
saltReadOnlySpan<byte>The 20-byte salt; random when omitted.