# < Summary

Information

Class: | Renci.SshNet.Security.Org.BouncyCastle.Crypto.Parameters.ECKeyParameters
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\crypto\parameters\ECKeyParameters.cs

Line coverage
38%

Covered lines: | 13
Uncovered lines: | 21
Coverable lines: | 34
Total lines: | 79
Line coverage: | 38.2%

Branch coverage
25%

Covered branches: | 3
Total branches: | 12
Branch coverage: | 25%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
.cctor() | 100% | 1 | 100%
.ctor(...) | 50% | 4 | 77.77%
get_AlgorithmName() | 100% | 1 | 0%
get_Parameters() | 100% | 1 | 100%
Equals(...) | 0% | 4 | 0%
Equals(...) | 0% | 2 | 0%
GetHashCode() | 100% | 1 | 0%
CreateKeyGenerationParameters(...) | 100% | 1 | 0%
VerifyAlgorithmName(...) | 50% | 2 | 80%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\crypto\parameters\ECKeyParameters.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | ``
|  | `3` |  | `using Renci.SshNet.Security.Org.BouncyCastle.Security;`
|  | `4` |  | `using Renci.SshNet.Security.Org.BouncyCastle.Utilities;`
|  | `5` |  | ``
|  | `6` |  | `namespace Renci.SshNet.Security.Org.BouncyCastle.Crypto.Parameters`
|  | `7` |  | `{`
|  | `8` |  | `internal abstract class ECKeyParameters`
|  | `9` |  | `: AsymmetricKeyParameter`
|  | `10` |  | `{`
| 1 | `11` |  | `private static readonly string[] algorithms = { "EC", "ECDH" };`
|  | `12` |  | ``
|  | `13` |  | `private readonly string algorithm;`
|  | `14` |  | `private readonly ECDomainParameters parameters;`
|  | `15` |  | ``
|  | `16` |  | `protected ECKeyParameters(`
|  | `17` |  | `string algorithm,`
|  | `18` |  | `bool isPrivate,`
|  | `19` |  | `ECDomainParameters parameters)`
| 27 | `20` |  | `: base(isPrivate)`
| 27 | `21` |  | `{`
| 27 | `22` |  | `if (algorithm == null)`
| 0 | `23` |  | `throw new ArgumentNullException("algorithm");`
| 27 | `24` |  | `if (parameters == null)`
| 0 | `25` |  | `throw new ArgumentNullException("parameters");`
|  | `26` |  | ``
| 27 | `27` |  | `this.algorithm = VerifyAlgorithmName(algorithm);`
| 27 | `28` |  | `this.parameters = parameters;`
| 27 | `29` |  | `}`
|  | `30` |  | ``
|  | `31` |  | `public string AlgorithmName`
|  | `32` |  | `{`
| 0 | `33` |  | `get { return algorithm; }`
|  | `34` |  | `}`
|  | `35` |  | ``
|  | `36` |  | `public ECDomainParameters Parameters`
|  | `37` |  | `{`
| 108 | `38` |  | `get { return parameters; }`
|  | `39` |  | `}`
|  | `40` |  | ``
|  | `41` |  | `public override bool Equals(`
|  | `42` |  | `object obj)`
| 0 | `43` |  | `{`
| 0 | `44` |  | `if (obj == this)`
| 0 | `45` |  | `return true;`
|  | `46` |  | ``
| 0 | `47` |  | `ECDomainParameters other = obj as ECDomainParameters;`
|  | `48` |  | ``
| 0 | `49` |  | `if (other == null)`
| 0 | `50` |  | `return false;`
|  | `51` |  | ``
| 0 | `52` |  | `return Equals(other);`
| 0 | `53` |  | `}`
|  | `54` |  | ``
|  | `55` |  | `protected bool Equals(`
|  | `56` |  | `ECKeyParameters other)`
| 0 | `57` |  | `{`
| 0 | `58` |  | `return parameters.Equals(other.parameters) && base.Equals(other);`
| 0 | `59` |  | `}`
|  | `60` |  | ``
|  | `61` |  | `public override int GetHashCode()`
| 0 | `62` |  | `{`
| 0 | `63` |  | `return parameters.GetHashCode() ^ base.GetHashCode();`
| 0 | `64` |  | `}`
|  | `65` |  | ``
|  | `66` |  | `internal ECKeyGenerationParameters CreateKeyGenerationParameters(`
|  | `67` |  | `SecureRandom random)`
| 0 | `68` |  | `{`
| 0 | `69` |  | `return new ECKeyGenerationParameters(parameters, random);`
| 0 | `70` |  | `}`
|  | `71` |  | ``
|  | `72` |  | `internal static string VerifyAlgorithmName(string algorithm)`
| 36 | `73` |  | `{`
| 36 | `74` |  | `if (Array.IndexOf(algorithms, algorithm, 0, algorithms.Length) < 0)`
| 0 | `75` |  | `throw new ArgumentException("unrecognised algorithm: " + algorithm, "algorithm");`
| 36 | `76` |  | `return algorithm.ToUpper();`
| 36 | `77` |  | `}`
|  | `78` |  | `}`
|  | `79` |  | `}`

# Methods/Properties

.cctor()
.ctor(System.String,System.Boolean,Renci.SshNet.Security.Org.BouncyCastle.Crypto.Parameters.ECDomainParameters)
get_AlgorithmName()
get_Parameters()
Equals(System.Object)
Equals(Renci.SshNet.Security.Org.BouncyCastle.Crypto.Parameters.ECKeyParameters)
GetHashCode()
CreateKeyGenerationParameters(Renci.SshNet.Security.Org.BouncyCastle.Security.SecureRandom)
VerifyAlgorithmName(System.String)