STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_hal_hash.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32L4xx_HAL_HASH_H
22 #define STM32L4xx_HAL_HASH_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32l4xx_hal_def.h"
30 
34 #if defined (HASH)
35 
39 /* Exported types ------------------------------------------------------------*/
47 typedef struct
48 {
49  uint32_t DataType;
52  uint32_t KeySize;
54  uint8_t* pKey;
56 } HASH_InitTypeDef;
57 
61 typedef enum
62 {
70 
74 typedef enum
75 {
85 
89 typedef enum
90 {
94 
95 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1U)
96 
99 typedef enum
100 {
107 #endif /* USE_HAL_HASH_REGISTER_CALLBACKS */
108 
109 
113 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1)
114 typedef struct __HASH_HandleTypeDef
115 #else
116 typedef struct
117 #endif /* (USE_HAL_HASH_REGISTER_CALLBACKS) */
118 {
119  HASH_InitTypeDef Init;
121  uint8_t *pHashInBuffPtr;
123  uint8_t *pHashOutBuffPtr;
125  uint8_t *pHashKeyBuffPtr;
127  uint8_t *pHashMsgBuffPtr;
129  uint32_t HashBuffSize;
131  __IO uint32_t HashInCount;
133  __IO uint32_t HashITCounter;
135  __IO uint32_t HashKeyCount;
137  HAL_StatusTypeDef Status;
139  HAL_HASH_PhaseTypeDef Phase;
143  HAL_LockTypeDef Lock;
145  __IO HAL_HASH_StateTypeDef State;
147  HAL_HASH_SuspendTypeDef SuspendRequest;
151  __IO uint32_t NbWordsAlreadyPushed;
153  __IO uint32_t ErrorCode;
155  __IO uint32_t Accumulation;
157 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1)
158  void (* InCpltCallback)( struct __HASH_HandleTypeDef * hhash);
160  void (* DgstCpltCallback)( struct __HASH_HandleTypeDef * hhash);
162  void (* ErrorCallback)( struct __HASH_HandleTypeDef * hhash);
164  void (* MspInitCallback)( struct __HASH_HandleTypeDef * hhash);
166  void (* MspDeInitCallback)( struct __HASH_HandleTypeDef * hhash);
168 #endif /* (USE_HAL_HASH_REGISTER_CALLBACKS) */
170 
171 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1U)
172 
175 typedef void (*pHASH_CallbackTypeDef)(HASH_HandleTypeDef * hhash);
176 #endif /* USE_HAL_HASH_REGISTER_CALLBACKS */
177 
182 /* Exported constants --------------------------------------------------------*/
183 
191 #define HASH_ALGOSELECTION_SHA1 0x00000000U
192 #define HASH_ALGOSELECTION_MD5 HASH_CR_ALGO_0
193 #define HASH_ALGOSELECTION_SHA224 HASH_CR_ALGO_1
194 #define HASH_ALGOSELECTION_SHA256 HASH_CR_ALGO
202 #define HASH_ALGOMODE_HASH 0x00000000U
203 #define HASH_ALGOMODE_HMAC HASH_CR_MODE
211 #define HASH_DATATYPE_32B 0x00000000U
212 #define HASH_DATATYPE_16B HASH_CR_DATATYPE_0
213 #define HASH_DATATYPE_8B HASH_CR_DATATYPE_1
214 #define HASH_DATATYPE_1B HASH_CR_DATATYPE
222 #define HASH_HMAC_KEYTYPE_SHORTKEY 0x00000000U
223 #define HASH_HMAC_KEYTYPE_LONGKEY HASH_CR_LKEY
231 #define HASH_FLAG_DINIS HASH_SR_DINIS
232 #define HASH_FLAG_DCIS HASH_SR_DCIS
233 #define HASH_FLAG_DMAS HASH_SR_DMAS
234 #define HASH_FLAG_BUSY HASH_SR_BUSY
235 #define HASH_FLAG_DINNE HASH_CR_DINNE
244 #define HASH_IT_DINI HASH_IMR_DINIE
245 #define HASH_IT_DCI HASH_IMR_DCIE
253 #define HAL_HASHEx_IRQHandler HAL_HASH_IRQHandler
261 #define HAL_HASH_ERROR_NONE 0x00000000U
262 #define HAL_HASH_ERROR_IT 0x00000001U
263 #define HAL_HASH_ERROR_DMA 0x00000002U
264 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1U)
265 #define HAL_HASH_ERROR_INVALID_CALLBACK 0x00000004U
266 #endif /* USE_HAL_HASH_REGISTER_CALLBACKS */
267 
275 /* Exported macros -----------------------------------------------------------*/
290 #define __HAL_HASH_GET_FLAG(__FLAG__) (((__FLAG__) > 8U) ? \
291  ((HASH->CR & (__FLAG__)) == (__FLAG__)) :\
292  ((HASH->SR & (__FLAG__)) == (__FLAG__)) )
293 
294 
302 #define __HAL_HASH_CLEAR_FLAG(__FLAG__) CLEAR_BIT(HASH->SR, (__FLAG__))
303 
304 
312 #define __HAL_HASH_ENABLE_IT(__INTERRUPT__) SET_BIT(HASH->IMR, (__INTERRUPT__))
313 
321 #define __HAL_HASH_DISABLE_IT(__INTERRUPT__) CLEAR_BIT(HASH->IMR, (__INTERRUPT__))
322 
328 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1)
329 #define __HAL_HASH_RESET_HANDLE_STATE(__HANDLE__) do{\
330  (__HANDLE__)->State = HAL_HASH_STATE_RESET;\
331  (__HANDLE__)->MspInitCallback = NULL; \
332  (__HANDLE__)->MspDeInitCallback = NULL; \
333  }while(0)
334 #else
335 #define __HAL_HASH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_HASH_STATE_RESET)
336 #endif /* USE_HAL_HASH_REGISTER_CALLBACKS */
337 
338 
343 #define __HAL_HASH_RESET_HANDLE_STATUS(__HANDLE__) ((__HANDLE__)->Status = HAL_OK)
344 
350 #define __HAL_HASH_SET_MDMAT() SET_BIT(HASH->CR, HASH_CR_MDMAT)
351 
356 #define __HAL_HASH_RESET_MDMAT() CLEAR_BIT(HASH->CR, HASH_CR_MDMAT)
357 
358 
363 #define __HAL_HASH_START_DIGEST() SET_BIT(HASH->STR, HASH_STR_DCAL)
364 
370 #define __HAL_HASH_SET_NBVALIDBITS(__SIZE__) MODIFY_REG(HASH->STR, HASH_STR_NBLW, 8U * ((__SIZE__) % 4U))
371 
376 #define __HAL_HASH_INIT() SET_BIT(HASH->CR, HASH_CR_INIT)
377 
383 /* Private macros --------------------------------------------------------*/
391 #define HASH_DIGEST_LENGTH() ((READ_BIT(HASH->CR, HASH_CR_ALGO) == HASH_ALGOSELECTION_SHA1) ? 20U : \
392  ((READ_BIT(HASH->CR, HASH_CR_ALGO) == HASH_ALGOSELECTION_SHA224) ? 28U : \
393  ((READ_BIT(HASH->CR, HASH_CR_ALGO) == HASH_ALGOSELECTION_SHA256) ? 32U : 16U ) ) )
394 
398 #define HASH_NBW_PUSHED() ((READ_BIT(HASH->CR, HASH_CR_NBW)) >> 8U)
399 
405 #define IS_HASH_DATATYPE(__DATATYPE__) (((__DATATYPE__) == HASH_DATATYPE_32B)|| \
406  ((__DATATYPE__) == HASH_DATATYPE_16B)|| \
407  ((__DATATYPE__) == HASH_DATATYPE_8B) || \
408  ((__DATATYPE__) == HASH_DATATYPE_1B))
409 
417 #define IS_HASH_DMA_MULTIBUFFER_SIZE(__SIZE__) ((READ_BIT(HASH->CR, HASH_CR_MDMAT) == 0U) || (((__SIZE__) % 4U) == 0U))
418 
427 #define IS_HMAC_DMA_MULTIBUFFER_SIZE(__HANDLE__,__SIZE__) ((((__HANDLE__)->DigestCalculationDisable) == RESET) || (((__SIZE__) % 4U) == 0U))
428 
433 #define IS_HASH_PROCESSING(__HANDLE__) ((__HANDLE__)->Phase == HAL_HASH_PHASE_PROCESS)
434 
440 #define IS_HMAC_PROCESSING(__HANDLE__) (((__HANDLE__)->Phase == HAL_HASH_PHASE_HMAC_STEP_1) || \
441  ((__HANDLE__)->Phase == HAL_HASH_PHASE_HMAC_STEP_2) || \
442  ((__HANDLE__)->Phase == HAL_HASH_PHASE_HMAC_STEP_3))
443 
448 /* Include HASH HAL Extended module */
449 #include "stm32l4xx_hal_hash_ex.h"
450 /* Exported functions --------------------------------------------------------*/
451 
460 /* Initialization/de-initialization methods **********************************/
461 HAL_StatusTypeDef HAL_HASH_Init(HASH_HandleTypeDef *hhash);
462 HAL_StatusTypeDef HAL_HASH_DeInit(HASH_HandleTypeDef *hhash);
468 /* Callbacks Register/UnRegister functions ***********************************/
469 #if (USE_HAL_HASH_REGISTER_CALLBACKS == 1)
470 HAL_StatusTypeDef HAL_HASH_RegisterCallback(HASH_HandleTypeDef *hhash, HAL_HASH_CallbackIDTypeDef CallbackID, pHASH_CallbackTypeDef pCallback);
471 HAL_StatusTypeDef HAL_HASH_UnRegisterCallback(HASH_HandleTypeDef *hhash, HAL_HASH_CallbackIDTypeDef CallbackID);
472 #endif /* USE_HAL_HASH_REGISTER_CALLBACKS */
473 
474 
484 /* HASH processing using polling *********************************************/
485 HAL_StatusTypeDef HAL_HASH_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
486 HAL_StatusTypeDef HAL_HASH_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
487 HAL_StatusTypeDef HAL_HASH_MD5_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
488 HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
489 
498 /* HASH processing using IT **************************************************/
499 HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
500 HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
501 HAL_StatusTypeDef HAL_HASH_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
502 HAL_StatusTypeDef HAL_HASH_MD5_Accumulate_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
512 /* HASH processing using DMA *************************************************/
513 HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
514 HAL_StatusTypeDef HAL_HASH_SHA1_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
515 HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
516 HAL_StatusTypeDef HAL_HASH_MD5_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
517 
526 /* HASH-MAC processing using polling *****************************************/
527 HAL_StatusTypeDef HAL_HMAC_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
528 HAL_StatusTypeDef HAL_HMAC_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);
529 
538 HAL_StatusTypeDef HAL_HMAC_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
539 HAL_StatusTypeDef HAL_HMAC_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);
540 
549 /* HASH-HMAC processing using DMA ********************************************/
550 HAL_StatusTypeDef HAL_HMAC_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
551 HAL_StatusTypeDef HAL_HMAC_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);
552 
562 /* Peripheral State methods **************************************************/
563 HAL_HASH_StateTypeDef HAL_HASH_GetState(HASH_HandleTypeDef *hhash);
564 HAL_StatusTypeDef HAL_HASH_GetStatus(HASH_HandleTypeDef *hhash);
565 void HAL_HASH_ContextSaving(HASH_HandleTypeDef *hhash, uint8_t* pMemBuffer);
566 void HAL_HASH_ContextRestoring(HASH_HandleTypeDef *hhash, uint8_t* pMemBuffer);
568 HAL_StatusTypeDef HAL_HASH_DMAFeed_ProcessSuspend(HASH_HandleTypeDef *hhash);
569 uint32_t HAL_HASH_GetError(HASH_HandleTypeDef *hhash);
570 
579 /* Private functions -----------------------------------------------------------*/
580 
585 /* Private functions */
586 HAL_StatusTypeDef HASH_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout, uint32_t Algorithm);
587 HAL_StatusTypeDef HASH_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm);
588 HAL_StatusTypeDef HASH_Accumulate_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm);
589 HAL_StatusTypeDef HASH_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Algorithm);
590 HAL_StatusTypeDef HASH_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm);
591 HAL_StatusTypeDef HASH_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);
592 HAL_StatusTypeDef HMAC_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout, uint32_t Algorithm);
593 HAL_StatusTypeDef HMAC_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Algorithm);
594 HAL_StatusTypeDef HMAC_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm);
595 
603 #endif /* HASH*/
604 
609 #ifdef __cplusplus
610 }
611 #endif
612 
613 
614 #endif /* STM32L4xx_HAL_HASH_H */
615 
616 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
uint8_t * pHashMsgBuffPtr
HAL_StatusTypeDef HAL_HMAC_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer)
Initialize the HASH peripheral in HMAC SHA1 mode, next process pInBuffer then read the computed diges...
HAL_StatusTypeDef HAL_HASH_SHA1_Finish(HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout)
Return the computed digest in SHA1 mode.
struct __HASH_HandleTypeDef else typedef struct endif HASH_HandleTypeDef
HASH Handle Structure definition.
DMA_HandleTypeDef * hdmain
void HAL_HASH_MspInit(HASH_HandleTypeDef *hhash)
Initialize the HASH MSP.
void HAL_HASH_ContextRestoring(HASH_HandleTypeDef *hhash, uint8_t *pMemBuffer)
Restore the HASH context in case of processing resumption.
HAL_HASH_CallbackIDTypeDef
HAL HASH common Callback ID enumeration definition.
HAL_HASH_PhaseTypeDef Phase
void HAL_HASH_MspDeInit(HASH_HandleTypeDef *hhash)
DeInitialize the HASH MSP.
HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer)
Initialize the HASH peripheral in SHA1 mode, next process pInBuffer then read the computed digest in ...
DMA handle Structure definition.
HAL_StatusTypeDef HAL_HASH_RegisterCallback(HASH_HandleTypeDef *hhash, HAL_HASH_CallbackIDTypeDef CallbackID, pHASH_CallbackTypeDef pCallback)
Register a User HASH Callback To be used instead of the weak (surcharged) predefined callback...
HAL_StatusTypeDef HASH_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
Initialize the HASH peripheral then initiate a DMA transfer to feed the input buffer to the Periphera...
void HAL_HASH_InCpltCallback(HASH_HandleTypeDef *hhash)
Input data transfer complete call back.
uint8_t * pHashKeyBuffPtr
HAL_StatusTypeDef HASH_Finish(HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout)
Return the computed digest.
void HAL_HASH_DgstCpltCallback(HASH_HandleTypeDef *hhash)
Digest computation complete call back.
HAL_StatusTypeDef HAL_HMAC_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout)
Initialize the HASH peripheral in HMAC SHA1 mode, next process pInBuffer then read the computed diges...
HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
If not already done, initialize the HASH peripheral in SHA1 mode then processes pInBuffer in interrup...
uint8_t * pHashOutBuffPtr
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_HASH_PhaseTypeDef
HAL phase structures definition.
Header file of HASH HAL module.
HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
Initialize the HASH peripheral in MD5 mode then initiate a DMA transfer to feed the input buffer to t...
HAL_StatusTypeDef HAL_HASH_Init(HASH_HandleTypeDef *hhash)
Initialize the HASH according to the specified parameters in the HASH_HandleTypeDef and create the as...
HAL_HASH_SuspendTypeDef
HAL HASH mode suspend definitions.
HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
If not already done, initialize the HASH peripheral in SHA1 mode then processes pInBuffer.
void(* pHASH_CallbackTypeDef)(HASH_HandleTypeDef *hhash)
HAL HASH Callback pointer definition.
HAL_StatusTypeDef HMAC_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Algorithm)
Initialize the HASH peripheral in HMAC mode, next process pInBuffer then read the computed digest in ...
HAL_StatusTypeDef HAL_HASH_GetStatus(HASH_HandleTypeDef *hhash)
Return the HASH HAL status.
HAL_StatusTypeDef HASH_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Algorithm)
Initialize the HASH peripheral, next process pInBuffer then read the computed digest in interruption ...
HAL_StatusTypeDef HAL_HASH_MD5_Accumulate_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
If not already done, initialize the HASH peripheral in MD5 mode then processes pInBuffer in interrupt...
__IO HAL_HASH_StateTypeDef State
HAL_StatusTypeDef HAL_HASH_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout)
Initialize the HASH peripheral in SHA1 mode, next process pInBuffer then read the computed digest...
void HAL_HASH_ErrorCallback(HASH_HandleTypeDef *hhash)
Error callback.
uint8_t * pHashInBuffPtr
HAL_StatusTypeDef HASH_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
If not already done, initialize the HASH peripheral then processes pInBuffer.
HAL_StatusTypeDef HASH_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout, uint32_t Algorithm)
Initialize the HASH peripheral, next process pInBuffer then read the computed digest.
uint32_t HAL_HASH_GetError(HASH_HandleTypeDef *hhash)
Return the HASH handle error code.
void HAL_HASH_SwFeed_ProcessSuspend(HASH_HandleTypeDef *hhash)
Initiate HASH processing suspension when in polling or interruption mode.
HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
Initialize the HASH peripheral in SHA1 mode then initiate a DMA transfer to feed the input buffer to ...
HAL_StatusTypeDef HAL_HASH_DeInit(HASH_HandleTypeDef *hhash)
DeInitialize the HASH peripheral.
HAL_StatusTypeDef HAL_HMAC_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer)
Initialize the HASH peripheral in HMAC MD5 mode, next process pInBuffer then read the computed digest...
FlagStatus DigestCalculationDisable
HAL_StatusTypeDef Status
__IO uint32_t HashInCount
__IO uint32_t Accumulation
HAL_LockTypeDef
HAL Lock structures definition.
HAL_StatusTypeDef HAL_HMAC_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
Initialize the HASH peripheral in HMAC MD5 mode then initiate the required DMA transfers to feed the ...
HAL_StatusTypeDef HAL_HMAC_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout)
Initialize the HASH peripheral in HMAC MD5 mode, next process pInBuffer then read the computed digest...
uint32_t HashBuffSize
HAL_StatusTypeDef HASH_Accumulate_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
If not already done, initialize the HASH peripheral then processes pInBuffer in interruption mode...
HAL_StatusTypeDef HMAC_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
Initialize the HASH peripheral in HMAC mode then initiate the required DMA transfers to feed the key ...
HAL_StatusTypeDef HAL_HASH_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer)
Initialize the HASH peripheral in MD5 mode, next process pInBuffer then read the computed digest in i...
HAL_HASH_StateTypeDef HAL_HASH_GetState(HASH_HandleTypeDef *hhash)
Return the HASH handle state.
ADC handle Structure definition.
HAL_StatusTypeDef HAL_HASH_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout)
Initialize the HASH peripheral in MD5 mode, next process pInBuffer then read the computed digest...
HAL_StatusTypeDef HAL_HASH_MD5_Finish(HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout)
Return the computed digest in MD5 mode.
void HAL_HASH_IRQHandler(HASH_HandleTypeDef *hhash)
Handle HASH interrupt request.
HAL_StatusTypeDef HAL_HMAC_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
Initialize the HASH peripheral in HMAC SHA1 mode then initiate the required DMA transfers to feed the...
HAL_StatusTypeDef HMAC_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout, uint32_t Algorithm)
Initialize the HASH peripheral in HMAC mode, next process pInBuffer then read the computed digest...
__IO uint32_t NbWordsAlreadyPushed
HAL_StatusTypeDef HAL_HASH_MD5_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
If not already done, initialize the HASH peripheral in MD5 mode then processes pInBuffer.
HAL_StatusTypeDef HAL_HASH_UnRegisterCallback(HASH_HandleTypeDef *hhash, HAL_HASH_CallbackIDTypeDef CallbackID)
Unregister a HASH Callback HASH Callback is redirected to the weak (surcharged) predefined callback...
__IO uint32_t HashITCounter
HAL_HASH_SuspendTypeDef SuspendRequest
HASH_InitTypeDef Init
__IO uint32_t HashKeyCount
HAL_StatusTypeDef HAL_HASH_DMAFeed_ProcessSuspend(HASH_HandleTypeDef *hhash)
Suspend the HASH processing when in DMA mode.
HAL_HASH_StateTypeDef
HAL State structures definition.
void HAL_HASH_ContextSaving(HASH_HandleTypeDef *hhash, uint8_t *pMemBuffer)
Save the HASH context in case of processing suspension.