auth/hmac: rename BLOCKSZ to BLOCKLEN
This commit is contained in:
parent
f1c4ceea84
commit
8f1b773e5f
@ -34,7 +34,7 @@ static int
|
|||||||
hmac_common_init(void *arg, const uint8_t *key, size_t keylen)
|
hmac_common_init(void *arg, const uint8_t *key, size_t keylen)
|
||||||
{
|
{
|
||||||
struct hmac_ctx *ctx = arg;
|
struct hmac_ctx *ctx = arg;
|
||||||
uint8_t ikeypad[HMAC_BLOCKSZ_MAX];
|
uint8_t ikeypad[HMAC_BLOCKLEN_MAX];
|
||||||
size_t i, olen;
|
size_t i, olen;
|
||||||
|
|
||||||
if (keylen > ctx->blocksz) {
|
if (keylen > ctx->blocksz) {
|
||||||
@ -92,8 +92,8 @@ hmac_final(void *arg, uint8_t *out, size_t *outlen)
|
|||||||
{
|
{
|
||||||
struct hmac_ctx *ctx = arg;
|
struct hmac_ctx *ctx = arg;
|
||||||
struct lc_hash_ctx *hctx;
|
struct lc_hash_ctx *hctx;
|
||||||
uint8_t m[HMAC_BLOCKSZ_MAX],
|
uint8_t m[HMAC_BLOCKLEN_MAX],
|
||||||
okeypad[HMAC_BLOCKSZ_MAX];
|
okeypad[HMAC_BLOCKLEN_MAX];
|
||||||
size_t i, olen;
|
size_t i, olen;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
#include "lilcrypto.h"
|
#include "lilcrypto.h"
|
||||||
|
|
||||||
|
|
||||||
#define HMAC_BLOCKSZ_MAX 128
|
#define HMAC_BLOCKLEN_MAX LC_SHA512_BLOCKLEN
|
||||||
|
|
||||||
|
|
||||||
struct hmac_ctx {
|
struct hmac_ctx {
|
||||||
struct lc_hash_ctx *hctx;
|
struct lc_hash_ctx *hctx;
|
||||||
size_t blocksz;
|
size_t blocksz;
|
||||||
uint8_t key[HMAC_BLOCKSZ_MAX];
|
uint8_t key[HMAC_BLOCKLEN_MAX];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user