# < 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

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_HashSize() | 100% | 1 | 100%
Hash(...) | 100% | 1 | 100%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using Renci.SshNet.Abstractions;`
|  | `2` |  | ``
|  | `3` |  | `namespace 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` |  | `{`
| 9 | `18` |  | `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)`
| 24 | `29` |  | `{`
| 24 | `30` |  | `using (var sha256 = CryptoAbstraction.CreateSHA256())`
| 24 | `31` |  | `{`
| 24 | `32` |  | `return sha256.ComputeHash(hashData);`
|  | `33` |  | `}`
| 24 | `34` |  | `}`
|  | `35` |  | `}`
|  | `36` |  | `}`

# Methods/Properties

get_HashSize()
Hash(System.Byte[])