Make the block lengths part of the public interface

This commit is contained in:
Lucas Gabriel Vuotto 2024-06-09 14:16:18 +00:00
parent 06e9c5ec67
commit f1c4ceea84
11 changed files with 64 additions and 61 deletions

View file

@ -63,7 +63,7 @@ hmac_sha224_sha256_init(void *arg, const void *initparams)
const struct lc_hmac_params *params = initparams;
struct hmac_ctx *ctx = arg;
ctx->blocksz = SHA256_BLOCKLEN;
ctx->blocksz = LC_SHA256_BLOCKLEN;
return hmac_common_init(ctx, params->key, params->keylen);
}
@ -74,7 +74,7 @@ hmac_sha384_sha512_init(void *arg, const void *initparams)
const struct lc_hmac_params *params = initparams;
struct hmac_ctx *ctx = arg;
ctx->blocksz = SHA512_BLOCKLEN;
ctx->blocksz = LC_SHA512_BLOCKLEN;
return hmac_common_init(ctx, params->key, params->keylen);
}