diff --git a/test/Renci.SshNet.Tests/Classes/Security/Cryptography/DsaKeyTest.cs b/test/Renci.SshNet.Tests/Classes/Security/Cryptography/DsaKeyTest.cs index 831b49a73..aefc8e513 100644 --- a/test/Renci.SshNet.Tests/Classes/Security/Cryptography/DsaKeyTest.cs +++ b/test/Renci.SshNet.Tests/Classes/Security/Cryptography/DsaKeyTest.cs @@ -24,7 +24,11 @@ private static DsaKey GetDsaKey(string fileName, string passPhrase = null) // 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}");