Commit eb67886f authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Tristan Matthews
Browse files

Prefix base64 functions to avoid name clash

Change-Id: I057120f60703d6b9cb625214765b6532d04ae315
Refs: #46972
parent d2ec1b9a
......@@ -49,7 +49,7 @@ static std::string
encodeBase64(unsigned char *input, int length)
{
size_t output_length;
uint8_t *encoded_str = base64_encode(input, length, &output_length);
uint8_t *encoded_str = sfl_base64_encode(input, length, &output_length);
if (!encoded_str)
THROW_ERROR(AudioSrtpException, "Out of memory for base64 operation");
std::string output((const char *)encoded_str, output_length);
......@@ -61,7 +61,7 @@ static std::string
decodeBase64(unsigned char *input, int length)
{
size_t output_length;
uint8_t *decoded_str = base64_decode(input, length, &output_length);
uint8_t *decoded_str = sfl_base64_decode(input, length, &output_length);
if (!decoded_str)
THROW_ERROR(AudioSrtpException, "Out of memory for base64 operation");
std::string output((const char *)decoded_str, output_length);
......
......@@ -43,8 +43,8 @@ static const uint8_t encoding_table[] = {
static const int mod_table[] = { 0, 2, 1 };
uint8_t *base64_encode(const uint8_t *data,
size_t input_length, size_t *output_length)
uint8_t *sfl_base64_encode(const uint8_t *data,
size_t input_length, size_t *output_length)
{
int i, j;
uint8_t *encoded_data;
......@@ -73,8 +73,8 @@ uint8_t *base64_encode(const uint8_t *data,
return encoded_data;
}
uint8_t *base64_decode(const uint8_t *data,
size_t input_length, size_t *output_length)
uint8_t *sfl_base64_decode(const uint8_t *data,
size_t input_length, size_t *output_length)
{
int i, j;
uint8_t decoding_table[256];
......
......@@ -45,8 +45,8 @@ extern "C" {
*
* @note callers should free the returned memory
*/
uint8_t *base64_encode(const uint8_t *data,
size_t input_length, size_t *output_length);
uint8_t *sfl_base64_encode(const uint8_t *data,
size_t input_length, size_t *output_length);
/**
* Decode a base64 buffer.
......@@ -58,8 +58,8 @@ uint8_t *base64_encode(const uint8_t *data,
*
* @note callers should free the returned memory
*/
uint8_t *base64_decode(const uint8_t *data,
size_t input_length, size_t *output_length);
uint8_t *sfl_base64_decode(const uint8_t *data,
size_t input_length, size_t *output_length);
#ifdef __cplusplus
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment