< Summary

Information
Class: Renci.SshNet.Security.Org.BouncyCastle.Math.Field.GF2Polynomial
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\math\field\GF2Polynomial.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 21
Coverable lines: 21
Total lines: 46
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%10%
get_Degree()100%10%
GetExponentsPresent()100%10%
Equals(...)0%40%
GetHashCode()100%10%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\math\field\GF2Polynomial.cs

#LineLine coverage
 1using System;
 2
 3using Renci.SshNet.Security.Org.BouncyCastle.Utilities;
 4
 5namespace Renci.SshNet.Security.Org.BouncyCastle.Math.Field
 6{
 7    internal class GF2Polynomial
 8        : IPolynomial
 9    {
 10        protected readonly int[] exponents;
 11
 012        internal GF2Polynomial(int[] exponents)
 013        {
 014            this.exponents = Arrays.Clone(exponents);
 015        }
 16
 17        public virtual int Degree
 18        {
 019            get { return exponents[exponents.Length - 1]; }
 20        }
 21
 22        public virtual int[] GetExponentsPresent()
 023        {
 024            return Arrays.Clone(exponents);
 025        }
 26
 27        public override bool Equals(object obj)
 028        {
 029            if (this == obj)
 030            {
 031                return true;
 32            }
 033            GF2Polynomial other = obj as GF2Polynomial;
 034            if (null == other)
 035            {
 036                return false;
 37            }
 038            return Arrays.AreEqual(exponents, other.exponents);
 039        }
 40
 41        public override int GetHashCode()
 042        {
 043            return Arrays.GetHashCode(exponents);
 044        }
 45    }
 46}