From 50d7b11d224b0aefe021cc3dc4ccce6ad7a36262 Mon Sep 17 00:00:00 2001 From: jkuehner Date: Thu, 22 Aug 2024 21:37:11 +0200 Subject: [PATCH] switch to SHA1.Create from new SHA1Managed (needs to be tested) --- src/S7CommPlusDriver/S7CommPlusConnection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/S7CommPlusDriver/S7CommPlusConnection.cs b/src/S7CommPlusDriver/S7CommPlusConnection.cs index 51bf11a..4aa8aeb 100644 --- a/src/S7CommPlusDriver/S7CommPlusConnection.cs +++ b/src/S7CommPlusDriver/S7CommPlusConnection.cs @@ -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)); }