Skip to content

Commit 50d7b11

Browse files
committed
switch to SHA1.Create from new SHA1Managed (needs to be tested)
1 parent 60c09af commit 50d7b11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/S7CommPlusDriver/S7CommPlusConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ public int Connect(string address, string password = "", int timeoutMs = 5000)
582582

583583
// Calculate challengeResponse [sha1(password) xor challenge]
584584
byte[] challengeResponse;
585-
using (SHA1Managed sha1 = new SHA1Managed())
585+
using (var sha1 = SHA1.Create())
586586
{
587587
challengeResponse = sha1.ComputeHash(Encoding.UTF8.GetBytes(password));
588588
}

0 commit comments

Comments
 (0)