using System;
using System.Security.Cryptography;
using Renci.SshNet.Common;
using Renci.SshNet.Compression;
using Renci.SshNet.Messages.Transport;
using Renci.SshNet.Security.Cryptography;
namespace Renci.SshNet.Security
{
///
/// Represents a key exchange algorithm.
///
public interface IKeyExchange : IDisposable
{
///
/// Occurs when the host key is received.
///
event EventHandler HostKeyReceived;
///
/// Gets the name of the algorithm.
///
///
/// The name of the algorithm.
///
string Name { get; }
///
/// Gets the exchange hash.
///
///
/// The exchange hash.
///
byte[] ExchangeHash { get; }
///
/// Starts the key exchange algorithm.
///
/// The session.
/// Key exchange init message.
void Start(Session session, KeyExchangeInitMessage message);
///
/// Finishes the key exchange algorithm.
///
void Finish();
///
/// Creates the client-side cipher to use.
///
///
/// The client cipher.
///
Cipher CreateClientCipher();
///
/// Creates the server-side cipher to use.
///
///
/// The server cipher.
///
Cipher CreateServerCipher();
///
/// Creates the server-side hash algorithm to use.
///
///
/// The server hash algorithm.
///
HashAlgorithm CreateServerHash();
///
/// Creates the client-side hash algorithm to use.
///
///
/// The client hash algorithm.
///
HashAlgorithm CreateClientHash();
///
/// Creates the compression algorithm to use to deflate data.
///
///
/// The compression method to deflate data.
///
Compressor CreateCompressor();
///
/// Creates the compression algorithm to use to inflate data.
///
///
/// The compression method to inflate data.
///
Compressor CreateDecompressor();
}
}