Lines Matching refs:hcryp
67 typedef status_t (*hal_cryp_aes_op_func_t)(CRYP_HandleTypeDef *hcryp, uint8_t *in_data,
128 memcpy(&data->hcryp.Init, &session->config, sizeof(session->config)); in do_aes()
130 status = HAL_CRYP_SetConfig(&data->hcryp, &session->config); in do_aes()
138 status = fn(&data->hcryp, in_buf, in_len, out_buf, HAL_MAX_DELAY); in do_aes()
151 static status_t hal_encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, in hal_encrypt() argument
154 return HAL_CRYP_Encrypt(hcryp, (uint32_t *)pPlainData, Size, (uint32_t *)pCypherData, in hal_encrypt()
158 static status_t hal_decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, in hal_decrypt() argument
161 return HAL_CRYP_Decrypt(hcryp, (uint32_t *)pCypherData, Size, (uint32_t *)pPlainData, in hal_decrypt()
385 if (data->hcryp.State == HAL_CRYP_STATE_RESET) { in crypto_stm32_session_setup()
386 if (HAL_CRYP_Init(&data->hcryp) != HAL_OK) { in crypto_stm32_session_setup()
498 if (HAL_CRYP_DeInit(&data->hcryp) != HAL_OK) { in crypto_stm32_session_free()
536 if (HAL_CRYP_DeInit(&data->hcryp) != HAL_OK) { in crypto_stm32_init()
552 .hcryp = {