< Summary

Information
Class: Renci.SshNet.Security.Org.BouncyCastle.Crypto.AsymmetricKeyParameter
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\crypto\AsymmetricKeyParameter.cs
Line coverage
31%
Covered lines: 6
Uncovered lines: 13
Coverable lines: 19
Total lines: 42
Line coverage: 31.5%
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
.ctor(...)100%1100%
get_IsPrivate()100%1100%
Equals(...)0%20%
Equals(...)100%10%
GetHashCode()100%10%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Security\BouncyCastle\crypto\AsymmetricKeyParameter.cs

#LineLine coverage
 1namespace Renci.SshNet.Security.Org.BouncyCastle.Crypto
 2{
 3    internal abstract class AsymmetricKeyParameter
 4    {
 5        private readonly bool privateKey;
 6
 277        protected AsymmetricKeyParameter(
 278            bool privateKey)
 279        {
 2710            this.privateKey = privateKey;
 2711        }
 12
 13    public bool IsPrivate
 14        {
 5415            get { return privateKey; }
 16        }
 17
 18    public override bool Equals(
 19      object obj)
 020    {
 021      AsymmetricKeyParameter other = obj as AsymmetricKeyParameter;
 22
 023      if (other == null)
 024      {
 025        return false;
 26      }
 27
 028      return Equals(other);
 029    }
 30
 31    protected bool Equals(
 32      AsymmetricKeyParameter other)
 033    {
 034      return privateKey == other.privateKey;
 035    }
 36
 37    public override int GetHashCode()
 038    {
 039      return privateKey.GetHashCode();
 040    }
 41    }
 42}