auth/hmac: rename BLOCKSZ to BLOCKLEN

This commit is contained in:
Lucas Gabriel Vuotto 2024-06-09 14:25:05 +00:00
parent f1c4ceea84
commit 8f1b773e5f
2 changed files with 5 additions and 5 deletions

View File

@ -34,7 +34,7 @@ static int
hmac_common_init(void *arg, const uint8_t *key, size_t keylen)
{
struct hmac_ctx *ctx = arg;
uint8_t ikeypad[HMAC_BLOCKSZ_MAX];
uint8_t ikeypad[HMAC_BLOCKLEN_MAX];
size_t i, olen;
if (keylen > ctx->blocksz) {
@ -92,8 +92,8 @@ hmac_final(void *arg, uint8_t *out, size_t *outlen)
{
struct hmac_ctx *ctx = arg;
struct lc_hash_ctx *hctx;
uint8_t m[HMAC_BLOCKSZ_MAX],
okeypad[HMAC_BLOCKSZ_MAX];
uint8_t m[HMAC_BLOCKLEN_MAX],
okeypad[HMAC_BLOCKLEN_MAX];
size_t i, olen;
int rc;

View File

@ -20,11 +20,11 @@
#include "lilcrypto.h"
#define HMAC_BLOCKSZ_MAX 128
#define HMAC_BLOCKLEN_MAX LC_SHA512_BLOCKLEN
struct hmac_ctx {
struct lc_hash_ctx *hctx;
size_t blocksz;
uint8_t key[HMAC_BLOCKSZ_MAX];
uint8_t key[HMAC_BLOCKLEN_MAX];
};