diff options
Diffstat (limited to 'hmac_digest.c')
-rw-r--r-- | hmac_digest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hmac_digest.c b/hmac_digest.c index 4acb1a1..4647101 100644 --- a/hmac_digest.c +++ b/hmac_digest.c @@ -21,13 +21,13 @@ libsha1_hmac_digest(struct libsha1_hmac_state *restrict state, const void *data, { if (!state->inited) { libsha1_init(&state->sha1_state, state->sha1_state.algorithm); - libsha1_update(&state->sha1_state, state->ipad, state->sha1_state.chunk_size * 8); + libsha1_update(&state->sha1_state, state->ipad, sizeof(state->sha1_state.chunk) * 8); } libsha1_digest(&state->sha1_state, data, n, output); libsha1_init(&state->sha1_state, state->sha1_state.algorithm); - libsha1_update(&state->sha1_state, state->opad, state->sha1_state.chunk_size * 8); + libsha1_update(&state->sha1_state, state->opad, sizeof(state->sha1_state.chunk) * 8); libsha1_digest(&state->sha1_state, output, state->outsize, output); state->inited = 0; } |