forked from wolfSSL/wolfssl
Merge pull request #1336 from SparkiDev/sha256_freescale
Transform_Sha256 no longer passed a buffer - fix for FREESCALE
This commit is contained in:
@@ -356,14 +356,14 @@ static int InitSha256(wc_Sha256* sha256)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Transform_Sha256(wc_Sha256* sha256, byte* buf)
|
static int Transform_Sha256(wc_Sha256* sha256)
|
||||||
{
|
{
|
||||||
int ret = wolfSSL_CryptHwMutexLock();
|
int ret = wolfSSL_CryptHwMutexLock();
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
#ifdef FREESCALE_MMCAU_CLASSIC_SHA
|
#ifdef FREESCALE_MMCAU_CLASSIC_SHA
|
||||||
cau_sha256_hash_n(buf, 1, sha256->digest);
|
cau_sha256_hash_n(sha256->buffer, 1, sha256->digest);
|
||||||
#else
|
#else
|
||||||
MMCAU_SHA256_HashN(buf, 1, sha256->digest);
|
MMCAU_SHA256_HashN(sha256->buffer, 1, sha256->digest);
|
||||||
#endif
|
#endif
|
||||||
wolfSSL_CryptHwMutexUnLock();
|
wolfSSL_CryptHwMutexUnLock();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user