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

KeyExchange

public abstract class KeyExchange : Algorithm, IKeyExchange, IDisposable
public byte[] ExchangeHash { get; }

protected Session Session { get; }

public byte[] SharedKey { get; protected set; }

protected KeyExchange()

protected abstract byte[] CalculateHash()

protected bool CanTrustHostKey(KeyHostAlgorithm host)

public Cipher CreateClientCipher(out bool isAead)

public HashAlgorithm CreateClientHash(out bool isEncryptThenMAC)

public Cipher CreateServerCipher(out bool isAead)

public HashAlgorithm CreateServerHash(out bool isEncryptThenMAC)

public void Dispose()

protected virtual void Dispose(bool disposing)

public virtual void Finish()

protected abstract byte[] Hash(byte[] hashData)

protected void SendMessage(Message message)

public virtual void Start(Session session, KeyExchangeInitMessage message, bool sendClientInitMessage)

protected abstract bool ValidateExchangeHash()