HAL HASH Overview ¶
Introducing HASH ¶
- group HASH_Introduction
-
The HASH hardware abstraction layer provides a set of APIs to configure and control the HASH peripheral on STM32 microcontrollers.
HMAC is suitable for applications requiring message authentication.
The HASH processor computes FIPS (Federal Information Processing Standards) approved digests of length of 160, 224, 256 bits, for messages of any length less than 264 bits (for SHA-1, SHA-224 and SHA-256) or less than 2128 bits (for SHA-384, SHA-512).
Module and files ¶
The following diagram illustrates the HASH module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the HASH module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL HASH module, specifying their locations, default values, and descriptions:
- group HASH_Configuration_Table
-
¶
Configuration inside the HASH driver ¶
Config defines
Description
Default value
Note
PRODUCT
from IDE
NONE
STM32C5XX
USE_ASSERT_DBG_PARAM
from the IDE
NONE
Allows you to use assert parameter checks.
USE_ASSERT_DBG_STATE
from the IDE
NONE
Allows you to use assert state checks.
USE_HAL_HASH_MODULE
from hal_conf.h
1
Enable the HAL HASH module
USE_HAL_CHECK_PARAM
from hal_conf.h
0
Allows you to use runtime parameter checks.
USE_HAL_HASH_REGISTER_CALLBACKS
from hal_conf.h
0
Allows to provide specific callback functions.
USE_HAL_HASH_GET_LAST_ERRORS
from hal_conf.h
0
Allows you to get last error codes.
USE_HAL_HASH_USER_DATA
from hal_conf.h
0
Allows to enable/disable user data.
USE_HAL_HASH_CLK_ENABLE_MODEL
from hal_conf.h
HAL_CLK_ENABLE_NO
Allows to enable the clock model for the HASH.
USE_HAL_HASH_DMA
from hal_conf.h
1
Allows to enable the HASH DMA module service.
USE_HAL_SECURE_CHECK_PARAM
from hal_conf.h
0
Allows to use the runtime check for sensitive APIs.
USE_HAL_CHECK_PROCESS_STATE
from hal_conf.h
0
Allows to use the load and store exclusive