Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CryptographicOperations.cs
Go to the documentation of this file.
2
4
5public static class CryptographicOperations
6{
7 [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
9 {
10 if (left.Length != right.Length)
11 {
12 return false;
13 }
14 int length = left.Length;
15 int num = 0;
16 for (int i = 0; i < length; i++)
17 {
18 num |= left[i] - right[i];
19 }
20 return num == 0;
21 }
22
23 [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
24 public static void ZeroMemory(Span<byte> buffer)
25 {
26 buffer.Clear();
27 }
28}
static bool FixedTimeEquals(ReadOnlySpan< byte > left, ReadOnlySpan< byte > right)