Skip to content

Commit

Permalink
Use Convert.ToHexString if available
Browse files Browse the repository at this point in the history
  • Loading branch information
JKorf committed Jan 6, 2025
1 parent 0d9627c commit ff87594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CryptoExchange.Net/Authentication/AuthenticationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,14 @@ private RSA CreateRSA()
/// <returns></returns>
protected static string BytesToHexString(byte[] buff)
{
#if NET9_0_OR_GREATER
return Convert.ToHexString(buff);
#else
var result = string.Empty;
foreach (var t in buff)
result += t.ToString("X2");
return result;
#endif
}

/// <summary>
Expand Down

0 comments on commit ff87594

Please sign in to comment.