Update tests use v3 API

This commit is contained in:
Zhi Guan
2022-02-27 19:11:51 +08:00
parent cadbb542e3
commit b885a07ea2
6 changed files with 29 additions and 29 deletions

View File

@@ -128,9 +128,9 @@ int test_hmac(const DIGEST *digest, const char *key_hex, const char *data_hex, c
uint8_t buf[64];
size_t len;
hex2bin(key_hex, strlen(key_hex), key);
hex2bin(data_hex, strlen(data_hex), data);
hex2bin(hmac_hex, strlen(hmac_hex), hmac);
hex_to_bytes(key_hex, strlen(key_hex), key, &len);
hex_to_bytes(data_hex, strlen(data_hex), data, &len);
hex_to_bytes(hmac_hex, strlen(hmac_hex), hmac, &len);
hmac_init(&ctx, digest, key, sizeof(key));
hmac_update(&ctx, data, sizeof(data));