From ff8759409baeb8ab60810e79d676fc3df7e08f77 Mon Sep 17 00:00:00 2001 From: JKorf Date: Mon, 6 Jan 2025 21:38:42 +0100 Subject: [PATCH] Use Convert.ToHexString if available --- CryptoExchange.Net/Authentication/AuthenticationProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CryptoExchange.Net/Authentication/AuthenticationProvider.cs b/CryptoExchange.Net/Authentication/AuthenticationProvider.cs index c547433..533475a 100644 --- a/CryptoExchange.Net/Authentication/AuthenticationProvider.cs +++ b/CryptoExchange.Net/Authentication/AuthenticationProvider.cs @@ -403,10 +403,14 @@ namespace CryptoExchange.Net.Authentication /// 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 } ///