Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CryptoPool.cs
Go to the documentation of this file.
1
using
System.Buffers
;
2
3
namespace
System.Security.Cryptography
;
4
5
internal
static
class
CryptoPool
6
{
7
internal
static
byte
[]
Rent
(
int
minimumLength)
8
{
9
return
ArrayPool<byte>
.
Shared
.Rent(minimumLength);
10
}
11
12
internal
static
void
Return
(
byte
[]
array
,
int
clearSize = -1)
13
{
14
bool
flag = clearSize < 0;
15
if
(!flag && clearSize != 0)
16
{
17
CryptographicOperations
.
ZeroMemory
(
array
.AsSpan(0, clearSize));
18
}
19
ArrayPool<byte>
.
Shared
.Return(
array
, flag);
20
}
21
}
System.Buffers.ArrayPool.Shared
static ArrayPool< T > Shared
Definition
ArrayPool.cs:7
System.Buffers.ArrayPool
Definition
ArrayPool.cs:4
System.Security.Cryptography.CryptoPool.Return
static void Return(byte[] array, int clearSize=-1)
Definition
CryptoPool.cs:12
System.Security.Cryptography.CryptoPool.Rent
static byte[] Rent(int minimumLength)
Definition
CryptoPool.cs:7
System.Security.Cryptography.CryptographicOperations.ZeroMemory
static void ZeroMemory(Span< byte > buffer)
Definition
CryptographicOperations.cs:24
System.Security.Cryptography.CryptographicOperations
Definition
CryptographicOperations.cs:6
System.Buffers
Definition
Base64.cs:7
System.Security.Cryptography
Definition
CryptoPool.cs:3
System.ExceptionArgument.array
@ array
source
System.Security.Cryptography.Encoding
System.Security.Cryptography
CryptoPool.cs
Generated by
1.10.0