aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/md5.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/md5.h')
-rw-r--r--src/microhttpd/md5.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/microhttpd/md5.h b/src/microhttpd/md5.h
index ad1151e9..3bbfd79e 100644
--- a/src/microhttpd/md5.h
+++ b/src/microhttpd/md5.h
@@ -31,34 +31,37 @@ struct MD5Context
31 uint8_t buffer[MD5_BLOCK_SIZE]; /* input buffer */ 31 uint8_t buffer[MD5_BLOCK_SIZE]; /* input buffer */
32}; 32};
33 33
34/* 34
35/**
35 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious 36 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
36 * initialization constants. 37 * initialization constants.
38 *
39 * @param ctx_ must be a `struct MD5Context *`
37 */ 40 */
38void MD5Init(struct MD5Context *ctx); 41void
42MD5Init (void *ctx_);
39 43
40/* 44
45/**
41 * Update context to reflect the concatenation of another buffer full 46 * Update context to reflect the concatenation of another buffer full
42 * of bytes. 47 * of bytes.
48 *
49 * @param ctx_ must be a `struct MD5Context *`
43 */ 50 */
44void MD5Update(struct MD5Context *ctx, const unsigned char *input, size_t len); 51void
52MD5Update (void *ctx_,
53 const uint8_t *input,
54 size_t len);
45 55
46/*
47 * Pad pad to 64-byte boundary with the bit pattern
48 * 1 0* (64-bit count of bits processed, MSB-first)
49 */
50void MD5Pad(struct MD5Context *ctx);
51 56
52/* 57/**
53 * Final wrapup--call MD5Pad, fill in digest and zero out ctx. 58 * Final wrapup--call MD5Pad, fill in digest and zero out ctx.
59 *
60 * @param ctx_ must be a `struct MD5Context *`
54 */ 61 */
55void MD5Final(unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *ctx); 62void
63MD5Final (void *ctx_,
64 unsigned char digest[MD5_DIGEST_SIZE]);
56 65
57/*
58 * The core of the MD5 algorithm, this alters an existing MD5 hash to
59 * reflect the addition of 16 longwords of new data. MD5Update blocks
60 * the data and converts bytes into longwords for this routine.
61 */
62void MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_SIZE]);
63 66
64#endif /* !MHD_MD5_H */ 67#endif /* !MHD_MD5_H */