Skip to content

Commit

Permalink
.NET 9: fix CA1872
Browse files Browse the repository at this point in the history
  • Loading branch information
mus65 committed Jun 15, 2024
1 parent 830e504 commit f2009ff
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ private static RsaKey GetRsaKey(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}");
Expand Down

0 comments on commit f2009ff

Please sign in to comment.