< Summary

Information
Class: Renci.SshNet.Security.Org.BouncyCastle.Math.Field.PrimeField
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\math\field\PrimeField.cs
Line coverage
26%
Covered lines: 5
Uncovered lines: 14
Coverable lines: 19
Total lines: 42
Line coverage: 26.3%
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%1100%
get_Characteristic()100%10%
get_Dimension()100%1100%
Equals(...)0%40%
GetHashCode()100%10%

File(s)

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

#LineLine coverage
 1namespace Renci.SshNet.Security.Org.BouncyCastle.Math.Field
 2{
 3    internal class PrimeField
 4        : IFiniteField
 5    {
 6        protected readonly BigInteger characteristic;
 7
 38        internal PrimeField(BigInteger characteristic)
 39        {
 310            this.characteristic = characteristic;
 311        }
 12
 13        public virtual BigInteger Characteristic
 14        {
 015            get { return characteristic; }
 16        }
 17
 18        public virtual int Dimension
 19        {
 2720            get { return 1; }
 21        }
 22
 23        public override bool Equals(object obj)
 024        {
 025            if (this == obj)
 026            {
 027                return true;
 28            }
 029            PrimeField other = obj as PrimeField;
 030            if (null == other)
 031            {
 032                return false;
 33            }
 034            return characteristic.Equals(other.characteristic);
 035        }
 36
 37        public override int GetHashCode()
 038        {
 039            return characteristic.GetHashCode();
 040        }
 41    }
 42}