Interface IKeyExchange
Represents a key exchange algorithm.
public interface IKeyExchange : IDisposable
- Inherited Members
Properties
ExchangeHash
Gets the exchange hash.
byte[] ExchangeHash { get; }
Property Value
- byte[]
The exchange hash.
Name
Gets the name of the algorithm.
string Name { get; }
Property Value
- string
The name of the algorithm.
Methods
CreateClientCipher(out bool)
Creates the client-side cipher to use.
Cipher CreateClientCipher(out bool isAead)
Parameters
Returns
- Cipher
The client cipher.
CreateClientHash(out bool)
Creates the client-side hash algorithm to use.
HashAlgorithm CreateClientHash(out bool isEncryptThenMAC)
Parameters
Returns
- HashAlgorithm
The client hash algorithm.
CreateCompressor()
Creates the compression algorithm to use to deflate data.
Compressor CreateCompressor()
Returns
- Compressor
The compression method to deflate data.
CreateDecompressor()
Creates the compression algorithm to use to inflate data.
Compressor CreateDecompressor()
Returns
- Compressor
The compression method to inflate data.
CreateServerCipher(out bool)
Creates the server-side cipher to use.
Cipher CreateServerCipher(out bool isAead)
Parameters
Returns
- Cipher
The server cipher.
CreateServerHash(out bool)
Creates the server-side hash algorithm to use.
HashAlgorithm CreateServerHash(out bool isEncryptThenMAC)
Parameters
Returns
- HashAlgorithm
The server hash algorithm.
Finish()
Finishes the key exchange algorithm.
void Finish()
Start(Session, KeyExchangeInitMessage, bool)
Starts the key exchange algorithm.
void Start(Session session, KeyExchangeInitMessage message, bool sendClientInitMessage)
Parameters
session
SessionThe session.
message
KeyExchangeInitMessageThe key exchange init message received from the server.
sendClientInitMessage
boolWhether to send a key exchange init message in response.
Events
HostKeyReceived
Occurs when the host key is received.
event EventHandler<HostKeyEventArgs> HostKeyReceived