<PackageReference Include="System.Formats.Asn1" Version="10.0.0-preview.3.25171.5" />

CryptoPool

static class CryptoPool
using System.Buffers; namespace System.Security.Cryptography { internal static class CryptoPool { internal const int ClearAll = -1; internal static byte[] Rent(int minimumLength) { return ArrayPool<byte>.Shared.Rent(minimumLength); } internal static void Return(ArraySegment<byte> arraySegment) { Return(arraySegment.Array, arraySegment.Count); } internal static void Return(byte[] array, int clearSize = -1) { bool flag = clearSize < 0; if (!flag && clearSize != 0) Array.Clear(array, 0, clearSize); ArrayPool<byte>.Shared.Return(array, flag); } } }