stm32l4xx_hal_cryp_ex.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. /* Define to prevent recursive inclusion -------------------------------------*/
  18. #ifndef STM32L4xx_HAL_CRYP_EX_H
  19. #define STM32L4xx_HAL_CRYP_EX_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #if defined(AES)
  24. /* Includes ------------------------------------------------------------------*/
  25. #include "stm32l4xx_hal_def.h"
  26. /** @addtogroup STM32L4xx_HAL_Driver
  27. * @{
  28. */
  29. /** @addtogroup CRYPEx
  30. * @{
  31. */
  32. /* Exported types ------------------------------------------------------------*/
  33. /* Exported constants --------------------------------------------------------*/
  34. /* Exported functions --------------------------------------------------------*/
  35. /** @addtogroup CRYPEx_Exported_Functions
  36. * @{
  37. */
  38. /** @addtogroup CRYPEx_Exported_Functions_Group1
  39. * @{
  40. */
  41. /* CallBack functions ********************************************************/
  42. void HAL_CRYPEx_ComputationCpltCallback(CRYP_HandleTypeDef *hcryp);
  43. /**
  44. * @}
  45. */
  46. /** @addtogroup CRYPEx_Exported_Functions_Group2
  47. * @{
  48. */
  49. /* AES encryption/decryption processing functions ****************************/
  50. HAL_StatusTypeDef HAL_CRYPEx_AES(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData, uint32_t Timeout);
  51. HAL_StatusTypeDef HAL_CRYPEx_AES_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData);
  52. HAL_StatusTypeDef HAL_CRYPEx_AES_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData);
  53. /* AES encryption/decryption/authentication processing functions *************/
  54. HAL_StatusTypeDef HAL_CRYPEx_AES_Auth(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData, uint32_t Timeout);
  55. HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData);
  56. HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData);
  57. /**
  58. * @}
  59. */
  60. /** @addtogroup CRYPEx_Exported_Functions_Group3
  61. * @{
  62. */
  63. /* AES suspension/resumption functions ***************************************/
  64. void HAL_CRYPEx_Read_IVRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
  65. void HAL_CRYPEx_Write_IVRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
  66. void HAL_CRYPEx_Read_SuspendRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
  67. void HAL_CRYPEx_Write_SuspendRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
  68. void HAL_CRYPEx_Read_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Output, uint32_t KeySize);
  69. void HAL_CRYPEx_Write_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint8_t* Input, uint32_t KeySize);
  70. void HAL_CRYPEx_Read_ControlRegister(CRYP_HandleTypeDef *hcryp, uint8_t* Output);
  71. void HAL_CRYPEx_Write_ControlRegister(CRYP_HandleTypeDef *hcryp, uint8_t* Input);
  72. void HAL_CRYPEx_ProcessSuspend(CRYP_HandleTypeDef *hcryp);
  73. /**
  74. * @}
  75. */
  76. /**
  77. * @}
  78. */
  79. /* Private functions -----------------------------------------------------------*/
  80. /** @addtogroup CRYPEx_Private_Functions CRYPEx Private Functions
  81. * @{
  82. */
  83. HAL_StatusTypeDef CRYP_AES_Auth_IT(CRYP_HandleTypeDef *hcryp);
  84. /**
  85. * @}
  86. */
  87. /**
  88. * @}
  89. */
  90. /**
  91. * @}
  92. */
  93. #endif /* AES */
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97. #endif /* STM32L4xx_HAL_CRYP_EX_H */