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 2ab9c63 commit 2f337ecCopy full SHA for 2f337ec
ClearScript/Util/MiscHelpers.cs
@@ -246,7 +246,7 @@ public static uint GetDigestAsUInt32(this string code)
246
247
unchecked
248
{
249
- var bytes = Encoding.Unicode.GetBytes(code);
+ var bytes = MemoryMarshal.AsBytes(code.AsSpan());
250
for (var index = 0; index < bytes.Length; index++)
251
252
digest ^= bytes[index];
@@ -262,7 +262,7 @@ public static ulong GetDigestAsUInt64(this string code)
262
var digest = 14695981039346656037UL;
263
const ulong prime = 1099511628211UL;
264
265
266
267
268
0 commit comments