Fri Aug 17 00:17:41 2018

Asterisk developer's documentation


func_md5.c File Reference

MD5 digest related dialplan functions. More...

#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"

Go to the source code of this file.

Functions

 AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"MD5 digest dialplan functions")
static int load_module (void)
static int md5 (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int unload_module (void)

Variables

static struct ast_custom_function md5_function

Detailed Description

MD5 digest related dialplan functions.

Author:
Olle E. Johansson <oej@edvina.net>
Russell Bryant <russelb@clemson.edu>

Definition in file func_md5.c.


Function Documentation

AST_MODULE_INFO_STANDARD ( ASTERISK_GPL_KEY  ,
"MD5 digest dialplan functions"   
)
static int load_module ( void   )  [static]

Definition at line 79 of file func_md5.c.

References ast_custom_function_register.

00080 {
00081    return ast_custom_function_register(&md5_function);
00082 }

static int md5 ( struct ast_channel chan,
const char *  cmd,
char *  data,
char *  buf,
size_t  len 
) [static]

Definition at line 54 of file func_md5.c.

References ast_log(), ast_md5_hash(), ast_strlen_zero(), and LOG_WARNING.

00056 {
00057    if (ast_strlen_zero(data)) {
00058       ast_log(LOG_WARNING, "Syntax: MD5(<data>) - missing argument!\n");
00059       return -1;
00060    }
00061 
00062    ast_md5_hash(buf, data);
00063    buf[32] = '\0';
00064 
00065    return 0;
00066 }

static int unload_module ( void   )  [static]

Definition at line 74 of file func_md5.c.

References ast_custom_function_unregister().

00075 {
00076    return ast_custom_function_unregister(&md5_function);
00077 }


Variable Documentation

Initial value:
 {
   .name = "MD5",
   .read = md5,
   .read_max = 33,
}

Definition at line 68 of file func_md5.c.


Generated on 17 Aug 2018 for Asterisk - The Open Source Telephony Project by  doxygen 1.6.1