Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
eb67886f
Commit
eb67886f
authored
Jun 18, 2014
by
Vittorio Giovara
Committed by
Tristan Matthews
Jul 02, 2014
Browse files
Prefix base64 functions to avoid name clash
Change-Id: I057120f60703d6b9cb625214765b6532d04ae315 Refs: #46972
parent
d2ec1b9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/audiortp/audio_srtp_session.cpp
View file @
eb67886f
...
...
@@ -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
);
...
...
daemon/src/audio/audiortp/base64.c
View file @
eb67886f
...
...
@@ -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
];
...
...
daemon/src/audio/audiortp/base64.h
View file @
eb67886f
...
...
@@ -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
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment