Signed-off-by: Dmitry Eremin-Solenikov dbaryshkov@gmail.com --- hmac-md5.c | 6 +++--- hmac.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hmac-md5.c b/hmac-md5.c index a27e64f6f61b..910d8a508a11 100644 --- a/hmac-md5.c +++ b/hmac-md5.c @@ -41,19 +41,19 @@ void hmac_md5_set_key(struct hmac_md5_ctx *ctx, size_t key_length, const uint8_t *key) { - HMAC_SET_KEY(ctx, &nettle_md5, key_length, key); + HMAC_BLOCK_SET_KEY(ctx, &nettle_bctx_md5, key_length, key); }
void hmac_md5_update(struct hmac_md5_ctx *ctx, size_t length, const uint8_t *data) { - md5_update(&ctx->state, length, data); + md5_block_update(&ctx->state, (struct block_ctx *)&ctx->block, length, data); }
void hmac_md5_digest(struct hmac_md5_ctx *ctx, size_t length, uint8_t *digest) { - HMAC_DIGEST(ctx, &nettle_md5, length, digest); + HMAC_BLOCK_DIGEST(ctx, &nettle_bctx_md5, length, digest); } diff --git a/hmac.h b/hmac.h index 84ff4a56d93b..20b9d8483b80 100644 --- a/hmac.h +++ b/hmac.h @@ -128,7 +128,7 @@ hmac_block_digest(const void *outer, const void *inner, void *state, /* HMAC using specific hash functions */
/* hmac-md5 */ -struct hmac_md5_ctx HMAC_CTX(struct md5_ctx); +struct hmac_md5_ctx HMAC_BLOCK_CTX(struct md5_state, MD5_BLOCK_SIZE);
void hmac_md5_set_key(struct hmac_md5_ctx *ctx,