mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
ARMv8 SHA-256: recalc data in SHA256 update
This commit is contained in:
@@ -301,6 +301,7 @@ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 le
|
|||||||
add = (len + sha256->buffLen) - numBlocks * WC_SHA256_BLOCK_SIZE;
|
add = (len + sha256->buffLen) - numBlocks * WC_SHA256_BLOCK_SIZE;
|
||||||
|
|
||||||
Sha256Transform(sha256, data, numBlocks);
|
Sha256Transform(sha256, data, numBlocks);
|
||||||
|
data += numBlocks * WC_SHA256_BLOCK_SIZE - sha256->buffLen;
|
||||||
|
|
||||||
AddLength(sha256, WC_SHA256_BLOCK_SIZE * numBlocks);
|
AddLength(sha256, WC_SHA256_BLOCK_SIZE * numBlocks);
|
||||||
|
|
||||||
@@ -885,6 +886,7 @@ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 le
|
|||||||
add = (len + sha256->buffLen) - numBlocks * WC_SHA256_BLOCK_SIZE;
|
add = (len + sha256->buffLen) - numBlocks * WC_SHA256_BLOCK_SIZE;
|
||||||
|
|
||||||
Sha256Transform(sha256, data, numBlocks);
|
Sha256Transform(sha256, data, numBlocks);
|
||||||
|
data += numBlocks * WC_SHA256_BLOCK_SIZE - sha256->buffLen;
|
||||||
|
|
||||||
AddLength(sha256, WC_SHA256_BLOCK_SIZE * numBlocks);
|
AddLength(sha256, WC_SHA256_BLOCK_SIZE * numBlocks);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user