HASH processing using polling mode functions. STMicroelectronics STM32F4
Publicitate
Publicitate
UM1725
c. DMA mode: processing APIs are not blocking functions and the CPU is not used for data transfer i.e. the data transfer is ensured by DMA e.g.
HAL_HASH_SHA1_Start_DMA()
4. When the processing function is called at first time after HAL_HASH_Init() the HASH peripheral is initialized and processes the buffer in input. After that, the digest computation is started. When processing multi-buffer use the accumulate function to write the data in the peripheral without starting the digest computation. In last buffer use the start function to input the last buffer ans start the digest computation. a. e.g. HAL_HASH_SHA1_Accumulate() : write 1st data buffer in the peripheral without starting the digest computation b. write (n-1)th data buffer in the peripheral without starting the digest computation c. HAL_HASH_SHA1_Start() : write (n)th data buffer in the peripheral and start the digest computation
5. In HMAC mode, there is no Accumulate API. Only Start API is available.
6. In case of using DMA, call the DMA start processing e.g.
HAL_HASH_SHA1_Start_DMA(). After that, call the finish function in order to get the digest value e.g. HAL_HASH_SHA1_Finish()
7. Call HAL_HASH_DeInit() to deinitialize the HASH peripheral.
28.3.2 HASH processing using polling mode functions
This section provides functions allowing to calculate in polling mode the hash value using one of the following algorithms:
MD5
SHA1
This section contains the following APIs:
28.3.3 HASH processing using interrupt mode functions
This section provides functions allowing to calculate in interrupt mode the hash value using one of the following algorithms:
MD5
SHA1
This section contains the following APIs:
28.3.4 HASH processing using DMA mode functions
This section provides functions allowing to calculate in DMA mode the hash value using one of the following algorithms:
MD5
SHA1
This section contains the following APIs:
DOCID025834 Rev 3 397/963
Descarcă
Publicitate