Changeset 1265 for pjproject/trunk/pjlib-util/include/pjlib-util/hmac_md5.h
- Timestamp:
- May 11, 2007 10:37:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/include/pjlib-util/hmac_md5.h
r1001 r1265 30 30 31 31 #include <pj/types.h> 32 #include <pjlib-util/md5.h> 32 33 33 34 PJ_BEGIN_DECL … … 41 42 * for Message Authentication, as described in RFC 2104 42 43 */ 44 45 /** 46 * The HMAC-MD5 context used in the incremental HMAC calculation. 47 */ 48 typedef struct pj_hmac_md5_context 49 { 50 pj_md5_context context; /**< MD5 context */ 51 pj_uint8_t k_opad[64]; /**< opad xor-ed with key */ 52 } pj_hmac_md5_context; 43 53 44 54 … … 58 68 59 69 /** 70 * Initiate HMAC-MD5 context for incremental hashing. 71 * 72 * @param hctx HMAC-MD5 context. 73 * @param key Pointer to the authentication key. 74 * @param key_len Length of the authentication key. 75 */ 76 PJ_DECL(void) pj_hmac_md5_init(pj_hmac_md5_context *hctx, 77 const pj_uint8_t *key, unsigned key_len); 78 79 /** 80 * Append string to the message. 81 * 82 * @param hctx HMAC-MD5 context. 83 * @param input Pointer to the input stream. 84 * @param input_len Length of input stream in bytes. 85 */ 86 PJ_DECL(void) pj_hmac_md5_update(pj_hmac_md5_context *hctx, 87 const pj_uint8_t *input, 88 unsigned input_len); 89 90 /** 91 * Finish the message and return the digest. 92 * 93 * @param hctx HMAC-MD5 context. 94 * @param digest Buffer to be filled with HMAC MD5 digest. 95 */ 96 PJ_DECL(void) pj_hmac_md5_final(pj_hmac_md5_context *hctx, 97 pj_uint8_t digest[16]); 98 99 /** 60 100 * @} 61 101 */
Note: See TracChangeset
for help on using the changeset viewer.