all vm to auth from the same a1-hash param used by sip (part deux)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10087 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-10-20 23:27:29 +00:00
parent 26a89ab3dc
commit 64f4e98eb5
4 changed files with 35 additions and 2 deletions
+14
View File
@@ -813,6 +813,20 @@ SWITCH_DECLARE(switch_status_t) switch_md5(unsigned char digest[SWITCH_MD5_DIGES
return apr_md5(digest, input, inputLen);
}
SWITCH_DECLARE(switch_status_t) switch_md5_string(char digest_str[SWITCH_MD5_DIGEST_STRING_SIZE], const void *input, switch_size_t inputLen)
{
unsigned char digest[SWITCH_MD5_DIGESTSIZE];
apr_status_t status = apr_md5(digest, input, inputLen);
int x;
digest_str[SWITCH_MD5_DIGEST_STRING_SIZE - 1] = '\0';
for( x = 0; x < SWITCH_MD5_DIGESTSIZE; x++) {
switch_snprintf(digest_str + (x * 2), 3, "%02x", digest[x]);
}
return status;
}
/* FIFO queues (apr-util) */