@@ -887,6 +887,8 @@ static int InitSha512_Family(wc_Sha512* sha512, void* heap, int devId,
887887
888888#ifdef WOLFSSL_HASH_KEEP
889889 sha512 -> msg = NULL ;
890+ sha512 -> len = 0 ;
891+ sha512 -> used = 0 ;
890892#endif
891893
892894 /* call the initialization function pointed to by initfp */
@@ -927,11 +929,6 @@ int wc_InitSha512_ex(wc_Sha512* sha512, void* heap, int devId)
927929 sha512 -> ctx .mode = ESP32_SHA_INIT ;
928930#endif
929931
930- #ifdef MAX3266X_SHA_CB
931- if (wc_MXC_TPU_SHA_Init (& (sha512 -> mxcCtx )) != 0 ){
932- return BAD_FUNC_ARG ;
933- }
934- #endif
935932
936933 return InitSha512_Family (sha512 , heap , devId , InitSha512 );
937934}
@@ -1676,9 +1673,6 @@ void wc_Sha512Free(wc_Sha512* sha512)
16761673 }
16771674#endif
16781675
1679- #ifdef MAX3266X_SHA_CB
1680- wc_MXC_TPU_SHA_Free (& (sha512 -> mxcCtx ));
1681- #endif
16821676
16831677#if defined(WOLFSSL_ASYNC_CRYPT ) && defined(WC_ASYNC_ENABLE_SHA512 )
16841678 wolfAsync_DevCtxFree (& sha512 -> asyncDev , WOLFSSL_ASYNC_MARKER_SHA512 );
@@ -2062,12 +2056,6 @@ int wc_InitSha384_ex(wc_Sha384* sha384, void* heap, int devId)
20622056 sha384 -> ctx .mode = ESP32_SHA_INIT ;
20632057#endif
20642058
2065- #ifdef MAX3266X_SHA_CB
2066- ret = wc_MXC_TPU_SHA_Init (& (sha384 -> mxcCtx ));
2067- if (ret != 0 ) {
2068- return ret ;
2069- }
2070- #endif
20712059
20722060 ret = InitSha384 (sha384 );
20732061 if (ret != 0 ) {
@@ -2172,9 +2160,6 @@ void wc_Sha384Free(wc_Sha384* sha384)
21722160 }
21732161#endif
21742162
2175- #ifdef MAX3266X_SHA_CB
2176- wc_MXC_TPU_SHA_Free (& (sha384 -> mxcCtx ));
2177- #endif
21782163
21792164 ForceZero (sha384 , sizeof (* sha384 ));
21802165}
@@ -2310,12 +2295,6 @@ int wc_Sha512Copy(wc_Sha512* src, wc_Sha512* dst)
23102295 }
23112296#endif
23122297
2313- #ifdef MAX3266X_SHA_CB
2314- ret = wc_MXC_TPU_SHA_Copy (& (src -> mxcCtx ), & (dst -> mxcCtx ));
2315- if (ret != 0 ) {
2316- return ret ;
2317- }
2318- #endif
23192298
23202299#if defined(PSOC6_HASH_SHA2 )
23212300 wc_Psoc6_Sha1_Sha2_Init (dst , WC_PSOC6_SHA512 , 0 );
@@ -2750,12 +2729,6 @@ int wc_Sha384Copy(wc_Sha384* src, wc_Sha384* dst)
27502729 }
27512730#endif
27522731
2753- #ifdef MAX3266X_SHA_CB
2754- ret = wc_MXC_TPU_SHA_Copy (& (src -> mxcCtx ), & (dst -> mxcCtx ));
2755- if (ret != 0 ) {
2756- return ret ;
2757- }
2758- #endif
27592732
27602733#if defined(PSOC6_HASH_SHA2 )
27612734 wc_Psoc6_Sha1_Sha2_Init (dst , WC_PSOC6_SHA384 , 0 );
0 commit comments