Преглед на файлове

Identify future optimization.

Gert Driesen преди 8 години
родител
ревизия
847119fd87
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/Renci.SshNet/Session.cs

+ 2 - 0
src/Renci.SshNet/Session.cs

@@ -1061,6 +1061,8 @@ namespace Renci.SshNet
                 var clientHash = _serverMac.ComputeHash(data, 0, data.Length - serverMacLength);
                 var serverHash = data.Take(data.Length - serverMacLength, serverMacLength);
 
+                // TODO add IsEqualTo overload that takes left+right index and number of bytes to compare;
+                // TODO that way we can eliminate the extrate allocation of the Take above
                 if (!serverHash.IsEqualTo(clientHash))
                 {
                     throw new SshConnectionException("MAC error", DisconnectReason.MacError);