Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CryptoPool.cs
Go to the documentation of this file.
2
4
5internal 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}
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
static void Return(byte[] array, int clearSize=-1)
Definition CryptoPool.cs:12
static byte[] Rent(int minimumLength)
Definition CryptoPool.cs:7