Update HMAC to support key == NULL or keylen == 0

This commit is contained in:
Zhi Guan
2026-06-09 15:14:37 +08:00
parent 849491cb33
commit d1d75a3109
2 changed files with 52 additions and 50 deletions

View File

@@ -30,8 +30,6 @@ typedef struct hmac_ctx_st {
} HMAC_CTX;
size_t hmac_size(const HMAC_CTX *ctx);
int hmac_init(HMAC_CTX *ctx, const DIGEST *digest, const uint8_t *key, size_t keylen);
int hmac_update(HMAC_CTX *ctx, const uint8_t *data, size_t datalen);
int hmac_finish(HMAC_CTX *ctx, uint8_t *mac, size_t *maclen);