diff --git a/CryptoExchange.Net/Authentication/AuthenticationProvider.cs b/CryptoExchange.Net/Authentication/AuthenticationProvider.cs
index c547433a..533475a1 100644
--- a/CryptoExchange.Net/Authentication/AuthenticationProvider.cs
+++ b/CryptoExchange.Net/Authentication/AuthenticationProvider.cs
@@ -403,10 +403,14 @@ private RSA CreateRSA()
///
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
}
///