@@ -27,18 +27,18 @@ public abstract class KeyExchangeDiffieHellmanGroupSha1 : KeyExchangeDiffieHellm
27
27
protected override byte [ ] CalculateHash ( )
28
28
{
29
29
var hashData = new _ExchangeHashData
30
- {
31
- ClientVersion = this . Session . ClientVersion ,
32
- ServerVersion = this . Session . ServerVersion ,
33
- ClientPayload = this . _clientPayload ,
34
- ServerPayload = this . _serverPayload ,
35
- HostKey = this . _hostKey ,
36
- ClientExchangeValue = this . _clientExchangeValue ,
37
- ServerExchangeValue = this . _serverExchangeValue ,
38
- SharedKey = this . SharedKey ,
39
- } . GetBytes ( ) ;
40
-
41
- return this . Hash ( hashData ) ;
30
+ {
31
+ ClientVersion = Session . ClientVersion ,
32
+ ServerVersion = Session . ServerVersion ,
33
+ ClientPayload = _clientPayload ,
34
+ ServerPayload = _serverPayload ,
35
+ HostKey = _hostKey ,
36
+ ClientExchangeValue = _clientExchangeValue ,
37
+ ServerExchangeValue = _serverExchangeValue ,
38
+ SharedKey = SharedKey ,
39
+ } . GetBytes ( ) ;
40
+
41
+ return Hash ( hashData ) ;
42
42
}
43
43
44
44
/// <summary>
@@ -50,17 +50,17 @@ public override void Start(Session session, KeyExchangeInitMessage message)
50
50
{
51
51
base . Start ( session , message ) ;
52
52
53
- this . Session . RegisterMessage ( "SSH_MSG_KEXDH_REPLY" ) ;
53
+ Session . RegisterMessage ( "SSH_MSG_KEXDH_REPLY" ) ;
54
54
55
- this . Session . MessageReceived += Session_MessageReceived ;
55
+ Session . MessageReceived += Session_MessageReceived ;
56
56
57
- this . _prime = this . GroupPrime ;
57
+ _prime = GroupPrime ;
58
58
59
- this . _group = new BigInteger ( new byte [ ] { 2 } ) ;
59
+ _group = new BigInteger ( new byte [ ] { 2 } ) ;
60
60
61
- this . PopulateClientExchangeValue ( ) ;
61
+ PopulateClientExchangeValue ( ) ;
62
62
63
- this . SendMessage ( new KeyExchangeDhInitMessage ( this . _clientExchangeValue ) ) ;
63
+ SendMessage ( new KeyExchangeDhInitMessage ( _clientExchangeValue ) ) ;
64
64
65
65
}
66
66
@@ -71,7 +71,7 @@ public override void Finish()
71
71
{
72
72
base . Finish ( ) ;
73
73
74
- this . Session . MessageReceived -= Session_MessageReceived ;
74
+ Session . MessageReceived -= Session_MessageReceived ;
75
75
}
76
76
77
77
private void Session_MessageReceived ( object sender , MessageEventArgs < Message > e )
@@ -80,12 +80,12 @@ private void Session_MessageReceived(object sender, MessageEventArgs<Message> e)
80
80
if ( message != null )
81
81
{
82
82
// Unregister message once received
83
- this . Session . UnRegisterMessage ( "SSH_MSG_KEXDH_REPLY" ) ;
83
+ Session . UnRegisterMessage ( "SSH_MSG_KEXDH_REPLY" ) ;
84
84
85
- this . HandleServerDhReply ( message . HostKey , message . F , message . Signature ) ;
85
+ HandleServerDhReply ( message . HostKey , message . F , message . Signature ) ;
86
86
87
87
// When SSH_MSG_KEXDH_REPLY received key exchange is completed
88
- this . Finish ( ) ;
88
+ Finish ( ) ;
89
89
}
90
90
}
91
91
@@ -188,7 +188,7 @@ protected override int BufferCapacity
188
188
189
189
protected override void LoadData ( )
190
190
{
191
- throw new System . NotImplementedException ( ) ;
191
+ throw new NotImplementedException ( ) ;
192
192
}
193
193
194
194
protected override void SaveData ( )
@@ -197,20 +197,20 @@ protected override void SaveData()
197
197
WriteBinaryString ( _clientVersion ) ;
198
198
WriteBinaryString ( _serverVersion ) ;
199
199
#else
200
- this . Write ( this . ClientVersion ) ;
201
- this . Write ( this . ServerVersion ) ;
200
+ Write ( ClientVersion ) ;
201
+ Write ( ServerVersion ) ;
202
202
#endif
203
- this . WriteBinaryString ( this . ClientPayload ) ;
204
- this . WriteBinaryString ( this . ServerPayload ) ;
205
- this . WriteBinaryString ( this . HostKey ) ;
203
+ WriteBinaryString ( ClientPayload ) ;
204
+ WriteBinaryString ( ServerPayload ) ;
205
+ WriteBinaryString ( HostKey ) ;
206
206
#if TUNING
207
207
WriteBinaryString ( _clientExchangeValue ) ;
208
208
WriteBinaryString ( _serverExchangeValue ) ;
209
209
WriteBinaryString ( _sharedKey ) ;
210
210
#else
211
- this . Write ( this . ClientExchangeValue ) ;
212
- this . Write ( this . ServerExchangeValue ) ;
213
- this . Write ( this . SharedKey ) ;
211
+ Write ( ClientExchangeValue ) ;
212
+ Write ( ServerExchangeValue ) ;
213
+ Write ( SharedKey ) ;
214
214
#endif
215
215
}
216
216
}
0 commit comments