add switch_md5

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10085 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-10-20 22:45:09 +00:00
parent 30c318b995
commit b17e3bff8a
4 changed files with 18 additions and 11 deletions

View File

@ -95,7 +95,7 @@
#endif
#define APU_HAVE_APR_ICONV 1
#define APU_HAVE_APR_ICONV 0
#define APU_HAVE_ICONV 0
#define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)

View File

@ -545,7 +545,6 @@
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -555,7 +554,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -569,7 +567,6 @@
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -579,7 +576,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -593,7 +589,6 @@
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -603,7 +598,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -865,7 +859,6 @@
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -875,7 +868,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -1311,7 +1303,6 @@
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -1321,7 +1312,6 @@
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"

View File

@ -509,6 +509,8 @@ SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t
/** UUIDs are formatted as: 00112233-4455-6677-8899-AABBCCDDEEFF */
#define SWITCH_UUID_FORMATTED_LENGTH 36
#define SWITCH_MD5_DIGESTSIZE 16
/**
* Format a UUID into a string, following the standard format
* @param buffer The buffer to place the formatted UUID string into. It must
@ -531,6 +533,14 @@ SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid);
*/
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const char *uuid_str);
/**
* MD5 in one step
* @param digest The final MD5 digest
* @param input The message block to use
* @param inputLen The length of the message block
*/
SWITCH_DECLARE(switch_status_t) switch_md5(unsigned char digest[SWITCH_MD5_DIGESTSIZE], const void *input, switch_size_t inputLen);
/** @} */
/**

View File

@ -63,6 +63,7 @@
/* apr-util headers */
#include <apr_queue.h>
#include <apr_uuid.h>
#include <apr_md5.h>
/* apr stubs */
@ -807,6 +808,12 @@ SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const cha
return apr_uuid_parse((apr_uuid_t *) uuid, uuid_str);
}
SWITCH_DECLARE(switch_status_t) switch_md5(unsigned char digest[SWITCH_MD5_DIGESTSIZE], const void *input, switch_size_t inputLen)
{
return apr_md5(digest, input, inputLen);
}
/* FIFO queues (apr-util) */
SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t **queue, unsigned int queue_capacity, switch_memory_pool_t *pool)