< Summary

Information
Class: Renci.SshNet.Messages.Transport.KeyExchangeEcdhReplyMessage
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Transport\KeyExchangeEcdhReplyMessage.cs
Line coverage
42%
Covered lines: 11
Uncovered lines: 15
Coverable lines: 26
Total lines: 72
Line coverage: 42.3%
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_KS()100%1100%
get_QS()100%1100%
get_Signature()100%1100%
get_BufferCapacity()100%10%
LoadData()100%1100%
SaveData()100%10%
Process(...)100%1100%

File(s)

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

#LineLine coverage
 1namespace Renci.SshNet.Messages.Transport
 2{
 3    /// <summary>
 4    /// Represents SSH_MSG_KEXECDH_REPLY message.
 5    /// </summary>
 6    [Message("SSH_MSG_KEX_ECDH_REPLY", 31)]
 7    public class KeyExchangeEcdhReplyMessage : Message
 8    {
 9        /// <summary>
 10        /// Gets a string encoding an X.509v3 certificate containing the server's ECDSA public host key.
 11        /// </summary>
 12        /// <value>The host key.</value>
 236213        public byte[] KS { get; private set; }
 14
 15        /// <summary>
 16        /// Gets the server's ephemeral contribution to the ECDH exchange, encoded as an octet string.
 17        /// </summary>
 236218        public byte[] QS { get; private set; }
 19
 20        /// <summary>
 21        /// Gets an octet string containing the server's signature of the newly established exchange hash value.
 22        /// </summary>
 23        /// <value>The signature.</value>
 236224        public byte[] Signature { get; private set; }
 25
 26        /// <summary>
 27        /// Gets the size of the message in bytes.
 28        /// </summary>
 29        /// <value>
 30        /// The size of the messages in bytes.
 31        /// </value>
 32        protected override int BufferCapacity
 33        {
 34            get
 035            {
 036                var capacity = base.BufferCapacity;
 037                capacity += 4; // KS length
 038                capacity += KS.Length; // KS
 039                capacity += 4; // QS length
 040                capacity += QS.Length; // QS
 041                capacity += 4; // Signature length
 042                capacity += Signature.Length; // Signature
 043                return capacity;
 044            }
 45        }
 46
 47        /// <summary>
 48        /// Called when type specific data need to be loaded.
 49        /// </summary>
 50        protected override void LoadData()
 118151        {
 118152            KS = ReadBinary();
 118153            QS = ReadBinary();
 118154            Signature = ReadBinary();
 118155        }
 56
 57        /// <summary>
 58        /// Called when type specific data need to be saved.
 59        /// </summary>
 60        protected override void SaveData()
 061        {
 062            WriteBinaryString(KS);
 063            WriteBinaryString(QS);
 064            WriteBinaryString(Signature);
 065        }
 66
 67        internal override void Process(Session session)
 118168        {
 118169            session.OnKeyExchangeEcdhReplyMessageReceived(this);
 118070        }
 71    }
 72}