Make the block lengths part of the public interface
This commit is contained in:
parent
06e9c5ec67
commit
f1c4ceea84
11 changed files with 64 additions and 61 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue