Tue Aug 24 20:35:31 2010

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"
Include dependency graph for func_md5.c:

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 74 of file func_md5.c.

References ast_custom_function_register.

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

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

Definition at line 50 of file func_md5.c.

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

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

static int unload_module ( void   )  [static]

Definition at line 69 of file func_md5.c.

References ast_custom_function_unregister().

00070 {
00071    return ast_custom_function_unregister(&md5_function);
00072 }


Variable Documentation

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

Definition at line 64 of file func_md5.c.


Generated on 24 Aug 2010 for Asterisk - the Open Source PBX by  doxygen 1.6.1