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

IKeyExchange

public interface IKeyExchange : IDisposable
Represents a key exchange algorithm.
byte[] ExchangeHash { get; }

Gets the exchange hash.

string Name { get; }

Gets the name of the algorithm.

Occurs when the host key is received.

Cipher CreateClientCipher(out bool isAead)

Creates the client-side cipher to use.

HashAlgorithm CreateClientHash(out bool isEncryptThenMAC)

Creates the client-side hash algorithm to use.

Creates the compression algorithm to use to deflate data.

Creates the compression algorithm to use to inflate data.

Cipher CreateServerCipher(out bool isAead)

Creates the server-side cipher to use.

HashAlgorithm CreateServerHash(out bool isEncryptThenMAC)

Creates the server-side hash algorithm to use.

void Finish()

Finishes the key exchange algorithm.

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

Starts the key exchange algorithm.