Lines Matching refs:stmCtx

55     static WC_INLINE void wc_Stm32_Hash_Clock_Enable(STM32_HASH_Context* stmCtx)  in wc_Stm32_Hash_Clock_Enable()  argument
62 (void)stmCtx; in wc_Stm32_Hash_Clock_Enable()
68 static WC_INLINE void wc_Stm32_Hash_Clock_Disable(STM32_HASH_Context* stmCtx) in wc_Stm32_Hash_Clock_Disable() argument
75 (void)stmCtx; in wc_Stm32_Hash_Clock_Disable()
159 void wc_Stm32_Hash_Init(STM32_HASH_Context* stmCtx) in wc_Stm32_Hash_Init() argument
162 XMEMSET(stmCtx, 0, sizeof(STM32_HASH_Context)); in wc_Stm32_Hash_Init()
165 int wc_Stm32_Hash_Update(STM32_HASH_Context* stmCtx, word32 algo, in wc_Stm32_Hash_Update() argument
169 byte* local = (byte*)stmCtx->buffer; in wc_Stm32_Hash_Update()
173 if (stmCtx->buffLen >= STM32_HASH_REG_SIZE) { in wc_Stm32_Hash_Update()
178 STM32_HASH_CLOCK_ENABLE(stmCtx); in wc_Stm32_Hash_Update()
181 if (wc_Stm32_Hash_RestoreContext(stmCtx) == 0) { in wc_Stm32_Hash_Update()
194 word32 add = min(len, STM32_HASH_REG_SIZE - stmCtx->buffLen); in wc_Stm32_Hash_Update()
195 XMEMCPY(&local[stmCtx->buffLen], data, add); in wc_Stm32_Hash_Update()
197 stmCtx->buffLen += add; in wc_Stm32_Hash_Update()
201 if (stmCtx->buffLen == STM32_HASH_REG_SIZE) { in wc_Stm32_Hash_Update()
203 HASH->DIN = *(word32*)stmCtx->buffer; in wc_Stm32_Hash_Update()
205 stmCtx->loLen += STM32_HASH_REG_SIZE; in wc_Stm32_Hash_Update()
206 stmCtx->buffLen = 0; in wc_Stm32_Hash_Update()
212 wc_Stm32_Hash_SaveContext(stmCtx); in wc_Stm32_Hash_Update()
216 STM32_HASH_CLOCK_DISABLE(stmCtx); in wc_Stm32_Hash_Update()
221 int wc_Stm32_Hash_Final(STM32_HASH_Context* stmCtx, word32 algo, in wc_Stm32_Hash_Final() argument
228 STM32_HASH_CLOCK_ENABLE(stmCtx); in wc_Stm32_Hash_Final()
231 wc_Stm32_Hash_RestoreContext(stmCtx); in wc_Stm32_Hash_Final()
234 if (stmCtx->buffLen > 0) { in wc_Stm32_Hash_Final()
235 HASH->DIN = *(word32*)stmCtx->buffer; in wc_Stm32_Hash_Final()
236 stmCtx->loLen += stmCtx->buffLen; in wc_Stm32_Hash_Final()
240 nbvalidbitsdata = 8 * (stmCtx->loLen % STM32_HASH_REG_SIZE); in wc_Stm32_Hash_Final()
255 STM32_HASH_CLOCK_DISABLE(stmCtx); in wc_Stm32_Hash_Final()