Signed-off-by: Dmitry Eremin-Solenikov dbaryshkov@gmail.com --- hmac-sha384.c | 4 ++-- hmac-sha512.c | 6 +++--- hmac.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hmac-sha384.c b/hmac-sha384.c index 30008b5f85c1..d162c4a0fab8 100644 --- a/hmac-sha384.c +++ b/hmac-sha384.c @@ -41,12 +41,12 @@ void hmac_sha384_set_key(struct hmac_sha512_ctx *ctx, size_t key_length, const uint8_t *key) { - HMAC_SET_KEY(ctx, &nettle_sha384, key_length, key); + HMAC_BLOCK_SET_KEY(ctx, &nettle_bctx_sha384, key_length, key); }
void hmac_sha384_digest(struct hmac_sha512_ctx *ctx, size_t length, uint8_t *digest) { - HMAC_DIGEST(ctx, &nettle_sha384, length, digest); + HMAC_BLOCK_DIGEST(ctx, &nettle_bctx_sha384, length, digest); } diff --git a/hmac-sha512.c b/hmac-sha512.c index de64637a8216..8028fb3f5518 100644 --- a/hmac-sha512.c +++ b/hmac-sha512.c @@ -41,19 +41,19 @@ void hmac_sha512_set_key(struct hmac_sha512_ctx *ctx, size_t key_length, const uint8_t *key) { - HMAC_SET_KEY(ctx, &nettle_sha512, key_length, key); + HMAC_BLOCK_SET_KEY(ctx, &nettle_bctx_sha512, key_length, key); }
void hmac_sha512_update(struct hmac_sha512_ctx *ctx, size_t length, const uint8_t *data) { - sha512_update(&ctx->state, length, data); + sha512_block_update(&ctx->state, (struct block_ctx *)&ctx->block, length, data); }
void hmac_sha512_digest(struct hmac_sha512_ctx *ctx, size_t length, uint8_t *digest) { - HMAC_DIGEST(ctx, &nettle_sha512, length, digest); + HMAC_BLOCK_DIGEST(ctx, &nettle_bctx_sha512, length, digest); } diff --git a/hmac.h b/hmac.h index 445d7c95e03f..ed0210857ade 100644 --- a/hmac.h +++ b/hmac.h @@ -203,7 +203,7 @@ hmac_sha224_digest(struct hmac_sha224_ctx *ctx, size_t length, uint8_t *digest);
/* hmac-sha512 */ -struct hmac_sha512_ctx HMAC_CTX(struct sha512_ctx); +struct hmac_sha512_ctx HMAC_BLOCK_CTX(struct sha512_state, SHA512_BLOCK_SIZE);
void hmac_sha512_set_key(struct hmac_sha512_ctx *ctx,