clan::Base64Encoder Class Reference - ClanLib SDK
Description: clan::Base64Encoder Class Reference

Public Member Functions | Static Public Member Functions | List of all members
clan::Base64Encoder Class Reference
clanCore Math

Base64 encoder class. More...

`#include <base64_encoder.h>`

## Public Member Functions
| Base64Encoder ()
| Constructs a base64 encoder.
void | feed (const void *data, int size, bool append_result=true)
| Feeds the encoder with more data.
void | finalize (bool append_result=true)
| Ends the base64 encoding.
DataBuffer & | get_result ()
| Returns the data in encoded form.
void | reset ()
| Resets the encoder.

## Static Public Member Functions
static std::string | encode (const DataBuffer &data)
| Encode.
static std::string | encode (const std::string &data)
| Encode.
static std::string | encode (const void *data, int size)
| Base64 encodes data and returns it as an 8 bit string.

## Detailed Description

Base64 encoder class.

## Constructor & Destructor Documentation

## ◆ Base64Encoder()

clan::Base64Encoder::Base64Encoder | ( |  | ) |

Constructs a base64 encoder.

## Member Function Documentation

## ◆ encode() [1/3]

std::string clan::Base64Encoder::encode | ( | const DataBuffer & | data | ) |
| static

Encode.

Parameters

  data | = Data Buffer

Returns
  String8

## ◆ encode() [2/3]

std::string clan::Base64Encoder::encode | ( | const std::string & | data | ) |
| static

Encode.

Parameters

  data | = String Ref8

Returns
  String8

## ◆ encode() [3/3]

std::string clan::Base64Encoder::encode | ( | const void * | data,
|  | int | size )
| static

Base64 encodes data and returns it as an 8 bit string.

## ◆ feed()

void clan::Base64Encoder::feed | ( | const void * | data,
|  | int | size,
|  | bool | append_result = true )

Feeds the encoder with more data.

## ◆ finalize()

void clan::Base64Encoder::finalize | ( | bool | append_result = true | ) |

Ends the base64 encoding.

## ◆ get_result()

DataBuffer & clan::Base64Encoder::get_result | ( |  | ) |

Returns the data in encoded form.

## ◆ reset()

void clan::Base64Encoder::reset | ( |  | ) |

Resets the encoder.

The documentation for this class was generated from the following file:

- base64_encoder.h