mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Fix for --enable-armasm
missing wc_Sha256FinalRaw
. Reproduced with ./configure --enable-all --enable-cryptocb --enable-armasm && make
.
This commit is contained in:
@ -1317,6 +1317,27 @@ int wc_Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
|
||||
return Sha256Update(sha256, data, len);
|
||||
}
|
||||
|
||||
int wc_Sha256FinalRaw(wc_Sha256* sha256, byte* hash)
|
||||
{
|
||||
#ifdef LITTLE_ENDIAN_ORDER
|
||||
word32 digest[WC_SHA256_DIGEST_SIZE / sizeof(word32)];
|
||||
#endif
|
||||
|
||||
if (sha256 == NULL || hash == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#ifdef LITTLE_ENDIAN_ORDER
|
||||
ByteReverseWords((word32*)digest, (word32*)sha256->digest,
|
||||
WC_SHA256_DIGEST_SIZE);
|
||||
XMEMCPY(hash, digest, WC_SHA256_DIGEST_SIZE);
|
||||
#else
|
||||
XMEMCPY(hash, sha256->digest, WC_SHA256_DIGEST_SIZE);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wc_Sha256Final(wc_Sha256* sha256, byte* hash)
|
||||
{
|
||||
int ret;
|
||||
|
Reference in New Issue
Block a user