diff options
author | Mattias Andrée <maandree@kth.se> | 2022-07-08 13:23:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-07-08 13:23:00 +0200 |
commit | 312a92b5104fd5e9090bc079f458f9105a91e1ea (patch) | |
tree | a2f68787a2a3ffaf5ca17661c503daebd96bc453 /digest.c | |
parent | Use uint_leastN_t instead of uintN_t (diff) | |
download | libsha2-312a92b5104fd5e9090bc079f458f9105a91e1ea.tar.gz libsha2-312a92b5104fd5e9090bc079f458f9105a91e1ea.tar.bz2 libsha2-312a92b5104fd5e9090bc079f458f9105a91e1ea.tar.xz |
Use SHA extensions1.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | digest.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ libsha2_digest(struct libsha2_state *restrict state, const void *message_, size_ if (off > state->chunk_size - (size_t)8 * (size_t)(1 + (state->algorithm > LIBSHA2_256))) { memset(state->chunk + off, 0, state->chunk_size - off); off = 0; - libsha2_process(state, state->chunk); + libsha2_process(state, state->chunk, state->chunk_size); } memset(state->chunk + off, 0, state->chunk_size - 8 - off); @@ -41,7 +41,7 @@ libsha2_digest(struct libsha2_state *restrict state, const void *message_, size_ state->chunk[state->chunk_size - 3] = (unsigned char)(state->message_size >> 16); state->chunk[state->chunk_size - 2] = (unsigned char)(state->message_size >> 8); state->chunk[state->chunk_size - 1] = (unsigned char)(state->message_size >> 0); - libsha2_process(state, state->chunk); + libsha2_process(state, state->chunk, state->chunk_size); n = libsha2_algorithm_output_size(state->algorithm); if (state->algorithm <= LIBSHA2_256) { |