namespace Renci.SshNet.Messages.Transport
{
///
/// Represents SSH_MSG_KEX_DH_GEX_INIT message.
///
[Message("SSH_MSG_KEX_DH_GEX_INIT", 32)]
internal sealed class KeyExchangeDhGroupExchangeInit : Message, IKeyExchangedAllowed
{
///
/// Gets the E value.
///
public byte[] E { get; private set; }
///
/// Gets the size of the message in bytes.
///
///
/// The size of the messages in bytes.
///
protected override int BufferCapacity
{
get
{
var capacity = base.BufferCapacity;
capacity += 4; // E length
capacity += E.Length; // E
return capacity;
}
}
///
/// Initializes a new instance of the class.
///
/// The client exchange value.
public KeyExchangeDhGroupExchangeInit(byte[] clientExchangeValue)
{
E = clientExchangeValue;
}
///
/// Called when type specific data need to be loaded.
///
protected override void LoadData()
{
E = ReadBinary();
}
///
/// Called when type specific data need to be saved.
///
protected override void SaveData()
{
WriteBinaryString(E);
}
internal override void Process(Session session)
{
throw new System.NotImplementedException();
}
}
}