< Summary

Information
Class: Renci.SshNet.Security.Org.BouncyCastle.Asn1.X9.X9ECParameters
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\asn1\x9\X9ECParameters.cs
Line coverage
53%
Covered lines: 21
Uncovered lines: 18
Coverable lines: 39
Total lines: 93
Line coverage: 53.8%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
GetInstance(...)0%20%
.ctor(...)100%10%
.ctor(...)100%10%
.ctor(...)100%10%
.ctor(...)100%10%
.ctor(...)100%1100%
get_Curve()100%1100%
get_G()100%1100%
get_N()100%1100%
get_H()100%1100%
GetSeed()100%1100%
get_CurveEntry()100%10%
get_BaseEntry()100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\asn1\x9\X9ECParameters.cs

#LineLine coverage
 1using System;
 2
 3using Renci.SshNet.Security.Org.BouncyCastle.Math;
 4using Renci.SshNet.Security.Org.BouncyCastle.Math.EC;
 5
 6namespace Renci.SshNet.Security.Org.BouncyCastle.Asn1.X9
 7{
 8    internal class X9ECParameters
 9    {
 10        private byte[]    seed;
 11
 12    public static X9ECParameters GetInstance(Object obj)
 013    {
 014      if (obj is X9ECParameters)
 015        return (X9ECParameters)obj;
 16
 017            return null;
 018    }
 19
 20        public X9ECParameters(
 21            ECCurve    curve,
 22            ECPoint    g,
 23            BigInteger  n)
 024            : this(curve, g, n, null, null)
 025        {
 026        }
 27
 28        public X9ECParameters(
 29            ECCurve     curve,
 30            X9ECPoint   g,
 31            BigInteger  n,
 32            BigInteger  h)
 033            : this(curve, g, n, h, null)
 034        {
 035        }
 36
 37        public X9ECParameters(
 38            ECCurve    curve,
 39            ECPoint    g,
 40            BigInteger  n,
 41            BigInteger  h)
 042            : this(curve, g, n, h, null)
 043        {
 044        }
 45
 46        public X9ECParameters(
 47            ECCurve    curve,
 48            ECPoint    g,
 49            BigInteger  n,
 50            BigInteger  h,
 51            byte[]    seed)
 052            : this(curve, new X9ECPoint(g), n, h, seed)
 053        {
 054        }
 55
 356        public X9ECParameters(
 357            ECCurve     curve,
 358            X9ECPoint   g,
 359            BigInteger  n,
 360            BigInteger  h,
 361            byte[]      seed)
 362        {
 363            this.Curve = curve;
 364            this.BaseEntry = g;
 365            this.N = n;
 366            this.H = h;
 367            this.seed = seed;
 368        }
 69
 1270        public ECCurve Curve { get; private set; }
 71
 72        public ECPoint G
 73        {
 2774            get { return BaseEntry.Point; }
 75        }
 76
 1277        public BigInteger N { get; private set; }
 78
 1279        public BigInteger H { get; private set; }
 80
 81        public byte[] GetSeed()
 982        {
 983            return seed;
 984        }
 85
 86        public X9Curve CurveEntry
 87        {
 088            get { return new X9Curve(Curve, seed); }
 89        }
 90
 1291        public X9ECPoint BaseEntry { get; private set; }
 92    }
 93}