# < Summary

Information

Class: | Renci.SshNet.Security.Org.BouncyCastle.Asn1.X9.X9ECPoint
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\asn1\x9\X9ECPoint.cs

Line coverage
44%

Covered lines: | 12
Uncovered lines: | 15
Coverable lines: | 27
Total lines: | 57
Line coverage: | 44.4%

Branch coverage
25%

Covered branches: | 2
Total branches: | 8
Branch coverage: | 25%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
.ctor(...) | 100% | 1 | 0%
.ctor(...) | 100% | 1 | 0%
.ctor(...) | 100% | 1 | 100%
GetPointEncoding() | 100% | 1 | 0%
get_Point() | 100% | 2 | 100%
get_IsPointCompressed() | 0% | 6 | 0%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using Renci.SshNet.Security.Org.BouncyCastle.Math.EC;`
|  | `2` |  | `using Renci.SshNet.Security.Org.BouncyCastle.Utilities;`
|  | `3` |  | ``
|  | `4` |  | `namespace Renci.SshNet.Security.Org.BouncyCastle.Asn1.X9`
|  | `5` |  | `{`
|  | `6` |  | `internal class X9ECPoint`
|  | `7` |  | `{`
|  | `8` |  | `private readonly byte[] encoding;`
|  | `9` |  | ``
|  | `10` |  | `private ECCurve c;`
|  | `11` |  | `private ECPoint p;`
|  | `12` |  | ``
|  | `13` |  | `public X9ECPoint(ECPoint p)`
| 0 | `14` |  | `: this(p, false)`
| 0 | `15` |  | `{`
| 0 | `16` |  | `}`
|  | `17` |  | ``
| 0 | `18` |  | `public X9ECPoint(ECPoint p, bool compressed)`
| 0 | `19` |  | `{`
| 0 | `20` |  | `this.p = p.Normalize();`
| 0 | `21` |  | `this.encoding = p.GetEncoded(compressed);`
| 0 | `22` |  | `}`
|  | `23` |  | ``
| 3 | `24` |  | `public X9ECPoint(ECCurve c, byte[] encoding)`
| 3 | `25` |  | `{`
| 3 | `26` |  | `this.c = c;`
| 3 | `27` |  | `this.encoding = Arrays.Clone(encoding);`
| 3 | `28` |  | `}`
|  | `29` |  | ``
|  | `30` |  | `public byte[] GetPointEncoding()`
| 0 | `31` |  | `{`
| 0 | `32` |  | `return Arrays.Clone(encoding);`
| 0 | `33` |  | `}`
|  | `34` |  | ``
|  | `35` |  | `public ECPoint Point`
|  | `36` |  | `{`
|  | `37` |  | `get`
| 9 | `38` |  | `{`
| 9 | `39` |  | `if (p == null)`
| 3 | `40` |  | `{`
| 3 | `41` |  | `p = c.DecodePoint(encoding).Normalize();`
| 3 | `42` |  | `}`
|  | `43` |  | ``
| 9 | `44` |  | `return p;`
| 9 | `45` |  | `}`
|  | `46` |  | `}`
|  | `47` |  | ``
|  | `48` |  | `public bool IsPointCompressed`
|  | `49` |  | `{`
|  | `50` |  | `get`
| 0 | `51` |  | `{`
| 0 | `52` |  | `byte[] octets = encoding;`
| 0 | `53` |  | `return octets != null && octets.Length > 0 && (octets[0] == 2 || octets[0] == 3);`
| 0 | `54` |  | `}`
|  | `55` |  | `}`
|  | `56` |  | `}`
|  | `57` |  | `}`

# Methods/Properties

.ctor(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECPoint)
.ctor(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECPoint,System.Boolean)
.ctor(Renci.SshNet.Security.Org.BouncyCastle.Math.EC.ECCurve,System.Byte[])
GetPointEncoding()
get_Point()
get_IsPointCompressed()