Selaa lähdekoodia

another .NET 9 SDK Build fix (#1475)

see 1b71e8fea48986decbfbecd4c656822c034e5601 and
 https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1872
mus65 1 vuosi sitten
vanhempi
sitoutus
3dda5c92ce

+ 4 - 0
test/Renci.SshNet.Tests/Classes/Security/Cryptography/DsaKeyTest.cs

@@ -24,7 +24,11 @@ namespace Renci.SshNet.Tests.Classes.Security.Cryptography
         // This is just to line up any differences in the assertion message.
         private static void AssertEqual(byte[] actualBytes, string expectedHex)
         {
+#if NET
+            string actualHex = Convert.ToHexString(actualBytes);
+#else
             string actualHex = BitConverter.ToString(actualBytes).Replace("-", "");
+#endif
 
             Assert.AreEqual(expectedHex, actualHex,
                 $"{Environment.NewLine}Expected: {expectedHex}{Environment.NewLine}  Actual: {actualHex}");