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

BufferedEncoder

public class BufferedEncoder
A class that allows encoding of data using a specific encoder to be processed in chunks.
public BufferedEncoder(ITranslator translator, int bufferSize)

Create.

public int ProcessByte(byte input, byte[] outBytes, 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.