33 #include "../System/databuffer.h"
42 static std::shared_ptr<Base64Encoder>
create();
48 virtual void reset() = 0;
51 virtual void feed(
const void *data,
int size,
bool append_result =
true) = 0;
54 virtual void finalize(
bool append_result =
true) = 0;
virtual void feed(const void *data, int size, bool append_result=true)=0
Feeds the encoder with more data.
Base64 encoder class.
Definition: base64_encoder.h:38
virtual const DataBufferPtr & result() const =0
Returns the data in encoded form.
virtual void reset()=0
Resets the encoder.
std::shared_ptr< DataBuffer > DataBufferPtr
Definition: databuffer.h:66
static std::string encode(const void *data, int size)
Base64 encodes data and returns it as a string.
static std::shared_ptr< Base64Encoder > create()
Constructs a base64 encoder.
Definition: Application/application.h:35
virtual void finalize(bool append_result=true)=0
Ends the base64 encoding.