<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.1" />

Org.BouncyCastle.Utilities.Encoders.BufferedDecoder

public class BufferedDecoder
A buffering class to allow translation from one format to another to be done in discrete chunks.
namespace Org.BouncyCastle.Utilities.Encoders { public class BufferedDecoder { public BufferedDecoder(ITranslator translator, int bufferSize); public int ProcessByte(byte input, byte[] output, int outOff); public int ProcessBytes(byte[] input, int inOff, int len, byte[] outBytes, int outOff); } }