mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 23:48:58 +00:00
fix incremental sha512
This commit is contained in:
parent
d83d4a4bf1
commit
6ee774a593
@ -561,7 +561,7 @@ void sha224_inc_blocks(sha224ctx *state, const uint8_t *in, size_t inblocks) {
|
|||||||
void sha512_inc_blocks(sha512ctx *state, const uint8_t *in, size_t inblocks) {
|
void sha512_inc_blocks(sha512ctx *state, const uint8_t *in, size_t inblocks) {
|
||||||
uint64_t bytes = load_bigendian_64(state->ctx + 64);
|
uint64_t bytes = load_bigendian_64(state->ctx + 64);
|
||||||
|
|
||||||
crypto_hashblocks_sha256(state->ctx, in, 128 * inblocks);
|
crypto_hashblocks_sha512(state->ctx, in, 128 * inblocks);
|
||||||
bytes += 128 * inblocks;
|
bytes += 128 * inblocks;
|
||||||
|
|
||||||
store_bigendian_64(state->ctx + 64, bytes);
|
store_bigendian_64(state->ctx + 64, bytes);
|
||||||
|
Loading…
Reference in New Issue
Block a user