< 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

MethodBranch coverage Cyclomatic complexity Line coverage
get_Name()100%1100%
.ctor(...)100%1100%

File(s)

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

#LineLine coverage
 1namespace 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>
 625511        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>
 282122        protected HostAlgorithm(string name)
 282123        {
 282124            Name = name;
 282125        }
 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)