Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CryptographicOperations.cs
Go to the documentation of this file.
1
using
System.Runtime.CompilerServices
;
2
3
namespace
System.Security.Cryptography
;
4
5
public
static
class
CryptographicOperations
6
{
7
[MethodImpl(
MethodImplOptions
.NoInlining |
MethodImplOptions
.NoOptimization)]
8
public
static
bool
FixedTimeEquals
(
ReadOnlySpan<byte>
left,
ReadOnlySpan<byte>
right)
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
}
System.Security.Cryptography.CryptographicOperations.FixedTimeEquals
static bool FixedTimeEquals(ReadOnlySpan< byte > left, ReadOnlySpan< byte > right)
Definition
CryptographicOperations.cs:8
System.Security.Cryptography.CryptographicOperations.ZeroMemory
static void ZeroMemory(Span< byte > buffer)
Definition
CryptographicOperations.cs:24
System.Security.Cryptography.CryptographicOperations
Definition
CryptographicOperations.cs:6
System.Runtime.CompilerServices.MethodImplOptions
MethodImplOptions
Definition
MethodImplOptions.cs:5
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.Security.Cryptography
Definition
CryptoPool.cs:3
System.ExceptionArgument.length
@ length
System.ExceptionArgument.buffer
@ buffer
System.ReadOnlySpan.Length
int Length
Definition
ReadOnlySpan.cs:70
System.ReadOnlySpan
Definition
ReadOnlySpan.cs:14
System.Span
Definition
Span.cs:14
source
System.Security.Cryptography.Primitives
System.Security.Cryptography
CryptographicOperations.cs
Generated by
1.10.0