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

BufferedDecoder

public class BufferedDecoder
A buffering class to allow translation from one format to another to be done in discrete chunks.
public BufferedDecoder(ITranslator translator, int bufferSize)

Create a buffered Decoder.

public int ProcessByte(byte input, byte[] output, int outOff)

Process one byte of data.

public int ProcessBytes(byte[] input, int inOff, int len, byte[] outBytes, int outOff)

Process data from a byte array.