namespace Renci.SshNet.Messages.Transport { /// /// Represents SSH_MSG_KEX_DH_GEX_REQUEST message. /// [Message("SSH_MSG_KEX_DH_GEX_REQUEST", MessageNumber)] internal class KeyExchangeDhGroupExchangeRequest : Message, IKeyExchangedAllowed { internal const byte MessageNumber = 34; /// /// Gets or sets the minimal size in bits of an acceptable group. /// /// /// The minimum. /// public uint Minimum { get; private set; } /// /// Gets or sets the preferred size in bits of the group the server will send. /// /// /// The preferred. /// public uint Preferred { get; private set; } /// /// Gets or sets the maximal size in bits of an acceptable group. /// /// /// The maximum. /// public uint Maximum { 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; // Minimum capacity += 4; // Preferred capacity += 4; // Maximum return capacity; } } /// /// Initializes a new instance of the class. /// /// The minimum. /// The preferred. /// The maximum. public KeyExchangeDhGroupExchangeRequest(uint minimum, uint preferred, uint maximum) { Minimum = minimum; Preferred = preferred; Maximum = maximum; } /// /// Called when type specific data need to be loaded. /// protected override void LoadData() { Minimum = ReadUInt32(); Preferred = ReadUInt32(); Maximum = ReadUInt32(); } /// /// Called when type specific data need to be saved. /// protected override void SaveData() { Write(Minimum); Write(Preferred); Write(Maximum); } internal override void Process(Session session) { throw new System.NotImplementedException(); } } }