using System;
namespace Hazel.Dtls
{
///
/// DTLS cipher suite interface for the handshake portion of
/// the connection.
///
public interface IHandshakeCipherSuite : IDisposable
{
///
/// Gets the size of the shared key
///
/// Size of the shared key in bytes
int SharedKeySize();
///
/// Calculate the size of the ServerKeyExchnage message
///
///
/// Private key that will be used to sign the message
///
/// Size of the message in bytes
int CalculateServerMessageSize(object privateKey);
///
/// Encodes the ServerKeyExchange message
///
/// Private key to use for signing
void EncodeServerKeyExchangeMessage(ByteSpan output, object privateKey);
///
/// Verifies the authenticity of a server key exchange
/// message and calculates the shared secret.
///
///
/// True if the authenticity has been validated and a shared key
/// was generated. Otherwise, false.
///
bool VerifyServerMessageAndGenerateSharedKey(ByteSpan output, ByteSpan serverKeyExchangeMessage, object publicKey);
///
/// Calculate the size of the ClientKeyExchange message
///
/// Size of the message in bytes
int CalculateClientMessageSize();
///
/// Encodes the ClientKeyExchangeMessage
///
void EncodeClientKeyExchangeMessage(ByteSpan output);
///
/// Verifies the validity of a client key exchange message
/// and calculats the hsared secret.
///
///
/// True if the client exchange message is valid and a
/// shared key was generated. Otherwise, false.
///
bool VerifyClientMessageAndGenerateSharedKey(ByteSpan output, ByteSpan clientKeyExchangeMessage);
}
}