static void MD5_begin(Hash *h)
{
MD5_Context *ctx = (MD5_Context *)h;
-
+
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
ctx->buf[2] = 0x98badcfe;
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-uint8_t* MD5_final(struct Hash *h)
+static uint8_t* MD5_final(struct Hash *h)
{
MD5_Context *ctx = (MD5_Context *)h;
unsigned count;
PURGE(ctx->in);
PURGE(ctx->bits);
- return ctx->buf;
+ return (uint8_t *)ctx->buf;
}
ctx->h.update = MD5_update;
ctx->h.final = MD5_final;
ctx->h.digest_len = 16;
- ctx->h.block_len = 16;
+ ctx->h.block_len = 64;
}