We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde4cdb commit 36f750cCopy full SHA for 36f750c
src/MySqlConnector/Core/ServerSession.cs
@@ -1,3 +1,4 @@
1
+using System.Buffers;
2
using System.Buffers.Text;
3
using System.ComponentModel;
4
using System.Diagnostics;
@@ -686,6 +687,9 @@ private bool ValidateFingerprint(byte[]? validationHash, ReadOnlySpan<byte> chal
686
687
688
static bool TryConvertFromHexString(ReadOnlySpan<byte> hexChars, Span<byte> data)
689
{
690
+#if NET10_0_OR_GREATER
691
+ return Convert.FromHexString(hexChars, data, out _, out _) == OperationStatus.Done;
692
+#else
693
ReadOnlySpan<byte> hexDigits = "0123456789ABCDEFabcdef"u8;
694
for (var i = 0; i < hexChars.Length; i += 2)
695
@@ -700,6 +704,7 @@ static bool TryConvertFromHexString(ReadOnlySpan<byte> hexChars, Span<byte> data
700
704
data[i / 2] = (byte) ((high << 4) | low);
701
705
}
702
706
return true;
707
+#endif
703
708
709
710
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments