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

Org.BouncyCastle.Utilities.Encoders.Base64Encoder

public class Base64Encoder : IEncoder
namespace Org.BouncyCastle.Utilities.Encoders { public class Base64Encoder : IEncoder { protected readonly byte[] encodingTable; protected byte padding; protected readonly byte[] decodingTable; protected void InitialiseDecodingTable(); public Base64Encoder(); public int Encode(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff); public int Encode(byte[] buf, int off, int len, Stream outStream); public int Decode(byte[] data, int off, int length, Stream outStream); public int DecodeString(string data, Stream outStream); } }