Skip to content

Commit

Permalink
switch to SHA1.Create from new SHA1Managed (needs to be tested)
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Aug 22, 2024
1 parent 60c09af commit 50d7b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/S7CommPlusDriver/S7CommPlusConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public int Connect(string address, string password = "", int timeoutMs = 5000)

// Calculate challengeResponse [sha1(password) xor challenge]
byte[] challengeResponse;
using (SHA1Managed sha1 = new SHA1Managed())
using (var sha1 = SHA1.Create())
{
challengeResponse = sha1.ComputeHash(Encoding.UTF8.GetBytes(password));
}
Expand Down

0 comments on commit 50d7b11

Please sign in to comment.