diff options
author | Mattias Andrée <maandree@kth.se> | 2019-02-10 20:57:56 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-02-10 20:57:56 +0100 |
commit | 15f132722cae63775dd7b2fef866d477c54c7b8e (patch) | |
tree | 27359241e0a1a0b6f304060bc0a9e7c9287efd06 /hmac_digest.c | |
parent | First commit (diff) | |
download | libsha1-15f132722cae63775dd7b2fef866d477c54c7b8e.tar.gz libsha1-15f132722cae63775dd7b2fef866d477c54c7b8e.tar.bz2 libsha1-15f132722cae63775dd7b2fef866d477c54c7b8e.tar.xz |
Implement SHA-0 and remove .chunk_size1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
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; } |