Add sm3 demos and sm3_hmac bug fix

This commit is contained in:
Zhi Guan
2022-07-31 21:25:03 +08:00
parent 4ab269919d
commit fa7b6a6b06
7 changed files with 100 additions and 6 deletions

View File

@@ -113,8 +113,8 @@ void sm3_hmac_finish(SM3_HMAC_CTX *ctx, uint8_t mac[SM3_HMAC_SIZE])
memset(ctx, 0, sizeof(*ctx));
}
void sm3_hmac(const uint8_t *data, size_t data_len,
const uint8_t *key, size_t key_len,
void sm3_hmac(const uint8_t *key, size_t key_len,
const uint8_t *data, size_t data_len,
uint8_t mac[SM3_HMAC_SIZE])
{
SM3_HMAC_CTX ctx;