|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "base64 encode/decode dialplan functions" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
static struct ast_custom_function | base64_decode_function |
|
static struct ast_custom_function | base64_encode_function |
|
Use the base64 as functions.
Definition in file func_base64.c.
static int base64_helper |
( |
struct ast_channel * |
chan, |
|
|
const char * |
cmd, |
|
|
char * |
data, |
|
|
char * |
buf, |
|
|
struct ast_str ** |
str, |
|
|
ssize_t |
len |
|
) |
| |
|
static |
Definition at line 75 of file func_base64.c.
References ast_base64decode(), ast_base64encode(), ast_log, ast_str_buffer(), ast_str_make_space, ast_str_size(), ast_str_strlen(), ast_str_update(), ast_strlen_zero, and LOG_WARNING.
Referenced by base64_buf_helper(), and base64_str_helper().
99 buf[decoded_len <= (
len - 1) ? decoded_len :
len - 1] =
'\0';
size_t ast_str_size(const struct ast_str *buf)
Returns the current maximum length (without reallocation) of the current buffer.
#define ast_str_make_space(buf, new_len)
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
#define ast_strlen_zero(foo)
int ast_base64decode(unsigned char *dst, const char *src, int max)
Decode data from base64.
int ast_base64encode(char *dst, const unsigned char *src, int srclen, int max)
Encode data in base64.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
void ast_str_update(struct ast_str *buf)
Update the length of the buffer, after using ast_str merely as a buffer.