Skip to content

Commit 07c2a60

Browse files
committed
Code formatting.
1 parent 68d9e4f commit 07c2a60

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/Renci.SshNet/Security/KeyExchangeDiffieHellman.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,14 @@ protected override bool ValidateExchangeHash()
6565
{
6666
var exchangeHash = CalculateHash();
6767

68-
var length = (uint)(_hostKey[0] << 24 | _hostKey[1] << 16 | _hostKey[2] << 8 | _hostKey[3]);
69-
68+
var length = (uint) (_hostKey[0] << 24 | _hostKey[1] << 16 | _hostKey[2] << 8 | _hostKey[3]);
7069
var algorithmName = Encoding.UTF8.GetString(_hostKey, 4, (int)length);
71-
7270
var key = Session.ConnectionInfo.HostKeyAlgorithms[algorithmName](_hostKey);
7371

7472
Session.ConnectionInfo.CurrentHostKeyAlgorithm = algorithmName;
7573

7674
if (CanTrustHostKey(key))
7775
{
78-
7976
return key.VerifySignature(exchangeHash, _signature);
8077
}
8178
return false;
@@ -113,7 +110,7 @@ protected void PopulateClientExchangeValue()
113110

114111
_clientExchangeValue = BigInteger.ModPow(_group, _randomValue, _prime);
115112

116-
} while (_clientExchangeValue < 1 || _clientExchangeValue > ((_prime - 1)));
113+
} while (_clientExchangeValue < 1 || _clientExchangeValue > (_prime - 1));
117114
}
118115

119116
/// <summary>

src/Renci.SshNet/Security/KeyExchangeDiffieHellmanGroupSha1.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ public override void Start(Session session, KeyExchangeInitMessage message)
5555
Session.MessageReceived += Session_MessageReceived;
5656

5757
_prime = GroupPrime;
58-
5958
_group = new BigInteger(new byte[] { 2 });
6059

6160
PopulateClientExchangeValue();
6261

6362
SendMessage(new KeyExchangeDhInitMessage(_clientExchangeValue));
64-
6563
}
6664

6765
/// <summary>

0 commit comments

Comments
 (0)