Skip to content

Commit

Permalink
deps: import torsion.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Jan 15, 2025
1 parent daa00ef commit 65374f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/torsion/src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -4506,7 +4506,7 @@ hmac_init(hmac_t *hmac, hash_id_t type, const unsigned char *key, size_t len) {
for (i = 0; i < len; i++)
pad[i] = key[i] ^ 0x36;

for (i = len; i < block_size; i++)
for (i = len; i < sizeof(pad); i++)
pad[i] = 0x36;

hash_init(&hmac->inner, type);
Expand All @@ -4515,7 +4515,7 @@ hmac_init(hmac_t *hmac, hash_id_t type, const unsigned char *key, size_t len) {
for (i = 0; i < len; i++)
pad[i] = key[i] ^ 0x5c;

for (i = len; i < block_size; i++)
for (i = len; i < sizeof(pad); i++)
pad[i] = 0x5c;

hash_init(&hmac->outer, type);
Expand Down

0 comments on commit 65374f9

Please sign in to comment.