Signed-off-by: Dmitry Eremin-Solenikov dbaryshkov@gmail.com --- hmac-ripemd160.c | 6 +++--- hmac.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hmac-ripemd160.c b/hmac-ripemd160.c index 24e2cbe7a578..fa4e6a09075c 100644 --- a/hmac-ripemd160.c +++ b/hmac-ripemd160.c @@ -41,19 +41,19 @@ void hmac_ripemd160_set_key(struct hmac_ripemd160_ctx *ctx, size_t key_length, const uint8_t *key) { - HMAC_SET_KEY(ctx, &nettle_ripemd160, key_length, key); + HMAC_BLOCK_SET_KEY(ctx, &nettle_bctx_ripemd160, key_length, key); }
void hmac_ripemd160_update(struct hmac_ripemd160_ctx *ctx, size_t length, const uint8_t *data) { - ripemd160_update(&ctx->state, length, data); + ripemd160_block_update(&ctx->state, (struct block_ctx *)&ctx->block, length, data); }
void hmac_ripemd160_digest(struct hmac_ripemd160_ctx *ctx, size_t length, uint8_t *digest) { - HMAC_DIGEST(ctx, &nettle_ripemd160, length, digest); + HMAC_BLOCK_DIGEST(ctx, &nettle_bctx_ripemd160, length, digest); } diff --git a/hmac.h b/hmac.h index 20b9d8483b80..cf083cfb0c3c 100644 --- a/hmac.h +++ b/hmac.h @@ -144,7 +144,7 @@ hmac_md5_digest(struct hmac_md5_ctx *ctx,
/* hmac-ripemd160 */ -struct hmac_ripemd160_ctx HMAC_CTX(struct ripemd160_ctx); +struct hmac_ripemd160_ctx HMAC_BLOCK_CTX(struct ripemd160_state, RIPEMD160_BLOCK_SIZE);
void hmac_ripemd160_set_key(struct hmac_ripemd160_ctx *ctx,