Signed-off-by: Dmitry Eremin-Solenikov dbaryshkov@gmail.com --- hmac-sha1.c | 6 +++--- hmac.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hmac-sha1.c b/hmac-sha1.c index 5e7188f92cf2..e968a51cd431 100644 --- a/hmac-sha1.c +++ b/hmac-sha1.c @@ -41,19 +41,19 @@ void hmac_sha1_set_key(struct hmac_sha1_ctx *ctx, size_t key_length, const uint8_t *key) { - HMAC_SET_KEY(ctx, &nettle_sha1, key_length, key); + HMAC_BLOCK_SET_KEY(ctx, &nettle_bctx_sha1, key_length, key); }
void hmac_sha1_update(struct hmac_sha1_ctx *ctx, size_t length, const uint8_t *data) { - sha1_update(&ctx->state, length, data); + sha1_block_update(&ctx->state, (struct block_ctx *)&ctx->block, length, data); }
void hmac_sha1_digest(struct hmac_sha1_ctx *ctx, size_t length, uint8_t *digest) { - HMAC_DIGEST(ctx, &nettle_sha1, length, digest); + HMAC_BLOCK_DIGEST(ctx, &nettle_bctx_sha1, length, digest); } diff --git a/hmac.h b/hmac.h index cf083cfb0c3c..117de3262857 100644 --- a/hmac.h +++ b/hmac.h @@ -160,7 +160,7 @@ hmac_ripemd160_digest(struct hmac_ripemd160_ctx *ctx,
/* hmac-sha1 */ -struct hmac_sha1_ctx HMAC_CTX(struct sha1_ctx); +struct hmac_sha1_ctx HMAC_BLOCK_CTX(struct sha1_state, SHA1_BLOCK_SIZE);
void hmac_sha1_set_key(struct hmac_sha1_ctx *ctx,