# < Summary

Information

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

Line coverage
100%

Covered lines: | 5
Uncovered lines: | 0
Coverable lines: | 5
Total lines: | 42
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_Name() | 100% | 1 | 100%
.ctor(...) | 100% | 1 | 100%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `namespace Renci.SshNet.Security`
|  | `2` |  | `{`
|  | `3` |  | `/// <summary>`
|  | `4` |  | `/// Base class for SSH host algorithms.`
|  | `5` |  | `/// </summary>`
|  | `6` |  | `public abstract class HostAlgorithm`
|  | `7` |  | `{`
|  | `8` |  | `/// <summary>`
|  | `9` |  | `/// Gets the host key name.`
|  | `10` |  | `/// </summary>`
| 6255 | `11` |  | `public string Name { get; private set; }`
|  | `12` |  | ``
|  | `13` |  | `/// <summary>`
|  | `14` |  | `/// Gets the host key data.`
|  | `15` |  | `/// </summary>`
|  | `16` |  | `public abstract byte[] Data { get; }`
|  | `17` |  | ``
|  | `18` |  | `/// <summary>`
|  | `19` |  | `/// Initializes a new instance of the <see cref="HostAlgorithm"/> class.`
|  | `20` |  | `/// </summary>`
|  | `21` |  | `/// <param name="name">The host key name.</param>`
| 2821 | `22` |  | `protected HostAlgorithm(string name)`
| 2821 | `23` |  | `{`
| 2821 | `24` |  | `Name = name;`
| 2821 | `25` |  | `}`
|  | `26` |  | ``
|  | `27` |  | `/// <summary>`
|  | `28` |  | `/// Signs the specified data.`
|  | `29` |  | `/// </summary>`
|  | `30` |  | `/// <param name="data">The data.</param>`
|  | `31` |  | `/// <returns>Signed data.</returns>`
|  | `32` |  | `public abstract byte[] Sign(byte[] data);`
|  | `33` |  | ``
|  | `34` |  | `/// <summary>`
|  | `35` |  | `/// Verifies the signature.`
|  | `36` |  | `/// </summary>`
|  | `37` |  | `/// <param name="data">The data.</param>`
|  | `38` |  | `/// <param name="signature">The signature.</param>`
|  | `39` |  | `/// <returns><see langword="true"/> is signature was successfully verifies; otherwise <see langword="false"/>.</`
|  | `40` |  | `public abstract bool VerifySignature(byte[] data, byte[] signature);`
|  | `41` |  | `}`
|  | `42` |  | `}`

# Methods/Properties

get_Name()
.ctor(System.String)