<PackageReference Include="SSH.NET" Version="2020.0.2" />

Renci.SshNet.Security.KeyExchange

public abstract class KeyExchange : Algorithm, IKeyExchange, IDisposable
Represents base class for different key exchange algorithm implementations
namespace Renci.SshNet.Security { public abstract class KeyExchange : Algorithm, IKeyExchange, IDisposable { protected Session Session { get; } public byte[] SharedKey { get; set; } public byte[] ExchangeHash { get; } public event EventHandler<HostKeyEventArgs> HostKeyReceived; public virtual void Start(Session session, KeyExchangeInitMessage message); public virtual void Finish(); public Cipher CreateServerCipher(); public Cipher CreateClientCipher(); public HashAlgorithm CreateServerHash(); public HashAlgorithm CreateClientHash(); public Compressor CreateCompressor(); public Compressor CreateDecompressor(); protected bool CanTrustHostKey(KeyHostAlgorithm host); protected abstract bool ValidateExchangeHash(); protected abstract byte[] CalculateHash(); protected abstract byte[] Hash(byte[] hashData); protected void SendMessage(Message message); public void Dispose(); protected virtual void Dispose(bool disposing); protected KeyExchange(); } }