Hi, This patch adds HMAC MD5 to apr-util.
Functions:
APU_DECLARE(apr_status_t) apr_hmac_md5_init(apr_hmac_md5_ctx_t *context,
const unsigned char *key,
apr_size_t keyLen);
APU_DECLARE(apr_status_t) apr_hmac_md5_update(apr_hmac_md5_ctx_t *context,
const unsigned char *input,
apr_size_t inputLen);
APU_DECLARE(apr_status_t) apr_hmac_md5_final(unsigned char
digest[MD5_DIGESTSIZE],
apr_hmac_md5_ctx_t *context);
APU_DECLARE(apr_status_t) apr_hmac_md5(unsigned char digest[MD5_DIGESTSIZE],
const unsigned char *key,
apr_size_t keyLen,
const unsigned char *input,
apr_size_t inputLen);
The algorithm is pretty straightforward and I needed it anyway.
I used RFC2104 as a guide.
It probably needs some looking over. Also the doc comments are a bit
dense (I'm a bit to tired to come up with any good ones).
Thx,
Sander
PS. If someone is looking into MD5, maybe MD5_DIGESTSIZE can be changed to
APR_MD5_DIGESTSIZE, like in the md4 code (which has APR_MD4_DIGESTSIZE).
apr-util-hmac-md5.patch
Description: Binary data
