Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FixedTimeEquals()

static bool System.Security.Cryptography.CryptographicOperations.FixedTimeEquals ( ReadOnlySpan< byte > left,
ReadOnlySpan< byte > right )
inlinestatic

Definition at line 8 of file CryptographicOperations.cs.

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 }

References System.length, and System.ReadOnlySpan< T >.Length.