1 /**
2   ******************************************************************************
3   * @file    stm32l4xx_hal_cryp_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of CRYPEx HAL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2017 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file in
13   * the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   ******************************************************************************
16   */
17 
18 /* Define to prevent recursive inclusion -------------------------------------*/
19 #ifndef STM32L4xx_HAL_CRYP_EX_H
20 #define STM32L4xx_HAL_CRYP_EX_H
21 
22 #ifdef __cplusplus
23  extern "C" {
24 #endif
25 
26 #if defined(AES)
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32l4xx_hal_def.h"
30 
31 /** @addtogroup STM32L4xx_HAL_Driver
32   * @{
33   */
34 
35 /** @addtogroup CRYPEx
36   * @{
37   */
38 
39 /* Exported types ------------------------------------------------------------*/
40 /* Exported constants --------------------------------------------------------*/
41 /* Exported functions --------------------------------------------------------*/
42 
43 /** @addtogroup CRYPEx_Exported_Functions
44   * @{
45   */
46 
47 /** @addtogroup CRYPEx_Exported_Functions_Group1
48   * @{
49   */
50 
51 /* CallBack functions  ********************************************************/
52 void HAL_CRYPEx_ComputationCpltCallback(CRYP_HandleTypeDef *hcryp);
53 
54 /**
55   * @}
56   */
57 
58 /** @addtogroup CRYPEx_Exported_Functions_Group2
59   * @{
60   */
61 
62 /* AES encryption/decryption processing functions  ****************************/
63 HAL_StatusTypeDef HAL_CRYPEx_AES(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData, uint32_t Timeout);
64 HAL_StatusTypeDef HAL_CRYPEx_AES_IT(CRYP_HandleTypeDef *hcryp,  uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData);
65 HAL_StatusTypeDef HAL_CRYPEx_AES_DMA(CRYP_HandleTypeDef *hcryp,  uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData);
66 
67 /* AES encryption/decryption/authentication processing functions  *************/
68 HAL_StatusTypeDef HAL_CRYPEx_AES_Auth(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData, uint32_t Timeout);
69 HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData);
70 HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData);
71 
72 /**
73   * @}
74   */
75 
76 /** @addtogroup CRYPEx_Exported_Functions_Group3
77   * @{
78   */
79 
80 /* AES suspension/resumption functions  ***************************************/
81 void HAL_CRYPEx_Read_IVRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
82 void HAL_CRYPEx_Write_IVRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
83 void HAL_CRYPEx_Read_SuspendRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
84 void HAL_CRYPEx_Write_SuspendRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
85 void HAL_CRYPEx_Read_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output, uint32_t KeySize);
86 void HAL_CRYPEx_Write_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input, uint32_t KeySize);
87 void HAL_CRYPEx_Read_ControlRegister(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
88 void HAL_CRYPEx_Write_ControlRegister(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
89 void HAL_CRYPEx_ProcessSuspend(CRYP_HandleTypeDef *hcryp);
90 
91 /**
92   * @}
93   */
94 
95 
96 /**
97   * @}
98   */
99 
100 /* Private functions -----------------------------------------------------------*/
101 /** @addtogroup CRYPEx_Private_Functions CRYPEx Private Functions
102   * @{
103   */
104 HAL_StatusTypeDef CRYP_AES_Auth_IT(CRYP_HandleTypeDef *hcryp);
105 
106 /**
107   * @}
108   */
109 
110 
111 /**
112   * @}
113   */
114 
115 /**
116   * @}
117   */
118 
119 #endif /* AES */
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* STM32L4xx_HAL_CRYP_EX_H */
126