< Summary

Information
Class: Renci.SshNet.Security.KeyExchangeDiffieHellmanGroupSha256
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha256.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 36
Line coverage: 100%
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_HashSize()100%1100%
Hash(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha256.cs

#LineLine coverage
 1using Renci.SshNet.Abstractions;
 2
 3namespace Renci.SshNet.Security
 4{
 5    /// <summary>
 6    /// Base class for "diffie-hellman" SHA-256 group algorithm implementations.
 7    /// </summary>
 8    internal abstract class KeyExchangeDiffieHellmanGroupSha256 : KeyExchangeDiffieHellmanGroupShaBase
 9    {
 10        /// <summary>
 11        /// Gets the size, in bits, of the computed hash code.
 12        /// </summary>
 13        /// <value>
 14        /// The size, in bits, of the computed hash code.
 15        /// </value>
 16        protected override int HashSize
 17        {
 918            get { return 256; }
 19        }
 20
 21        /// <summary>
 22        /// Hashes the specified data bytes.
 23        /// </summary>
 24        /// <param name="hashData">The hash data.</param>
 25        /// <returns>
 26        /// The hash of the data.
 27        /// </returns>
 28        protected override byte[] Hash(byte[] hashData)
 2429        {
 2430            using (var sha256 = CryptoAbstraction.CreateSHA256())
 2431            {
 2432                return sha256.ComputeHash(hashData);
 33            }
 2434        }
 35    }
 36}

Methods/Properties

get_HashSize()
Hash(System.Byte[])