< Summary

Information
Class: Renci.SshNet.Messages.Transport.KeyExchangeDhInitMessage
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs
Line coverage
73%
Covered lines: 14
Uncovered lines: 5
Coverable lines: 19
Total lines: 61
Line coverage: 73.6%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_E()100%1100%
get_BufferCapacity()100%1100%
.ctor(...)100%1100%
LoadData()100%10%
SaveData()100%1100%
Process(...)100%10%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs

#LineLine coverage
 1namespace Renci.SshNet.Messages.Transport
 2{
 3    /// <summary>
 4    /// Represents SSH_MSG_KEXDH_INIT message.
 5    /// </summary>
 6    [Message("SSH_MSG_KEXDH_INIT", 30)]
 7    internal sealed class KeyExchangeDhInitMessage : Message, IKeyExchangedAllowed
 8    {
 9        /// <summary>
 10        /// Gets the E value.
 11        /// </summary>
 3612        public byte[] E { get; private set; }
 13
 14        /// <summary>
 15        /// Gets the size of the message in bytes.
 16        /// </summary>
 17        /// <value>
 18        /// The size of the messages in bytes.
 19        /// </value>
 20        protected override int BufferCapacity
 21        {
 22            get
 1223            {
 1224                var capacity = base.BufferCapacity;
 1225                capacity += 4; // E length
 1226                capacity += E.Length; // E
 1227                return capacity;
 1228            }
 29        }
 30
 31        /// <summary>
 32        /// Initializes a new instance of the <see cref="KeyExchangeDhInitMessage"/> class.
 33        /// </summary>
 34        /// <param name="clientExchangeValue">The client exchange value.</param>
 1235        public KeyExchangeDhInitMessage(byte[] clientExchangeValue)
 1236        {
 1237            E = clientExchangeValue;
 1238        }
 39
 40        /// <summary>
 41        /// Called when type specific data need to be loaded.
 42        /// </summary>
 43        protected override void LoadData()
 044        {
 045            E = ReadBinary();
 046        }
 47
 48        /// <summary>
 49        /// Called when type specific data need to be saved.
 50        /// </summary>
 51        protected override void SaveData()
 1252        {
 1253            WriteBinaryString(E);
 1254        }
 55
 56        internal override void Process(Session session)
 057        {
 058            throw new System.NotImplementedException();
 59        }
 60    }
 61}