# < Summary

Information

Class: | Renci.SshNet.Security.Org.BouncyCastle.Security.DigestUtilities
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\security\DigestUtilities.cs

Line coverage
0%

Covered lines: | 0
Uncovered lines: | 12
Coverable lines: | 12
Total lines: | 34
Line coverage: | 0%

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
--- | --- | --- | ---
.ctor() | 100% | 1 | 0%
DoFinal(...) | 100% | 1 | 0%
DoFinal(...) | 100% | 1 | 0%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\security\DigestUtilities.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using Renci.SshNet.Security.Org.BouncyCastle.Crypto;`
|  | `2` |  | ``
|  | `3` |  | `namespace Renci.SshNet.Security.Org.BouncyCastle.Security`
|  | `4` |  | `{`
|  | `5` |  | `/// <remarks>`
|  | `6` |  | `/// Utility class for creating IDigest objects from their names/Oids`
|  | `7` |  | `/// </remarks>`
|  | `8` |  | `internal sealed class DigestUtilities`
|  | `9` |  | `{`
|  | `10` |  | `private enum DigestAlgorithm {`
|  | `11` |  | `SHA_256`
|  | `12` |  | `};`
|  | `13` |  | ``
| 0 | `14` |  | `private DigestUtilities()`
| 0 | `15` |  | `{`
| 0 | `16` |  | `}`
|  | `17` |  | ``
|  | `18` |  | `public static byte[] DoFinal(`
|  | `19` |  | `IDigest digest)`
| 0 | `20` |  | `{`
| 0 | `21` |  | `byte[] b = new byte[digest.GetDigestSize()];`
| 0 | `22` |  | `digest.DoFinal(b, 0);`
| 0 | `23` |  | `return b;`
| 0 | `24` |  | `}`
|  | `25` |  | ``
|  | `26` |  | `public static byte[] DoFinal(`
|  | `27` |  | `IDigest digest,`
|  | `28` |  | `byte[] input)`
| 0 | `29` |  | `{`
| 0 | `30` |  | `digest.BlockUpdate(input, 0, input.Length);`
| 0 | `31` |  | `return DoFinal(digest);`
| 0 | `32` |  | `}`
|  | `33` |  | `}`
|  | `34` |  | `}`

# Methods/Properties

.ctor()
DoFinal(Renci.SshNet.Security.Org.BouncyCastle.Crypto.IDigest)
DoFinal(Renci.SshNet.Security.Org.BouncyCastle.Crypto.IDigest,System.Byte[])