RTOS-integrated Crypto Common Framework Module.
More...
RTOS-integrated Crypto Common Framework Module.
◆ SF_CRYPTO_CODE_VERSION_MAJOR
| #define SF_CRYPTO_CODE_VERSION_MAJOR (2U) |
The API version of SSP Crypto Framework Common Module
◆ SF_CRYPTO_Close()
SSP Crypto Framework Common Close operation.
- Parameters
-
| [in,out] | p_api_ctrl | Pointer to a Crypto framework control block |
- Return values
-
| SSP_SUCCESS | Module was successfully closed. |
| SSP_ERR_NOT_OPEN | Module has not opened. |
| SSP_ERR_ASSERTION | NULL pointer is passed as an input parameter. |
| SSP_ERR_INTERNAL | RTOS service returned a unexpected error. |
| SSP_ERR_CRYPTO_HAL_ERROR | Unable to successfully close the Crypto Common HAL module. |
Check if the module has been opened. If not, return error.
Close a lower level crypto driver.
◆ SF_CRYPTO_Lock()
Locks the module. This API is utilized for locking shared resources.
- Parameters
-
| [in,out] | p_api_ctrl | Pointer to a Crypto framework control block |
- Return values
-
| SSP_SUCCESS | Module resources are successfully locked. |
| SSP_ERR_TIMEOUT | Unable to get ownership of the mutex within the specified time. |
| SSP_ERR_INTERNAL | Thread suspension was aborted. Critical error. |
| SSP_ERR_ASSERTION | NULL pointer is passed.as an input parameter. |
| SSP_ERR_NOT_OPEN | The module is not yet opened. |
Check if the module has been opened. If not, return error.
Acquire the mutex.
◆ SF_CRYPTO_Open()
SSP Crypto Framework Common Open operation.
- Parameters
-
| [in,out] | p_api_ctrl | Pointer to a Crypto framework control block |
| [in] | p_cfg | Pointer to a Crypto framework configuration structure |
- Return values
-
| SSP_SUCCESS | Crypto framework was successfully opened. |
| SSP_ERR_ASSERTION | NULL pointer is passed. |
| SSP_ERR_INTERNAL | RTOS service returned a unexpected error. |
| SSP_ERR_CRYPTO_HAL_ERROR | Crypto HAL driver retuned an error. |
Check if the module has been opened. If opened, return error.
Open a lower level crypto driver and ensure the engine is initialized here or already in other SCE supported stack.
◆ SF_CRYPTO_StatusGet()
Gets the Crypto Common Framework module status.
- Parameters
-
| [in] | p_api_ctrl | Pointer to a Crypto framework control block |
| [out] | p_status | Memory location to store module status. |
- Return values
-
| SSP_SUCCESS | Status returned successfully. |
| SSP_ERR_ASSERTION | The parameter p_status is NULL. |
| SSP_ERR_CRYPTO_COMMON_NOT_OPENED | This common module is not yet opened. |
Check if the module has a valid / known status else return error.
Return the module status.
◆ SF_CRYPTO_Unlock()
Unlocks the module. This API is utilized for unlocking shared resources.
- Parameters
-
| [in,out] | p_api_ctrl | Pointer to a Crypto framework control block |
- Return values
-
| SSP_SUCCESS | Module resources are successfully unlocked. |
| SSP_ERR_ASSERTION | NULL pointer is passed as an input parameter. |
| SSP_ERR_INTERNAL | Mutex is not owned by a caller thread. |
| SSP_ERR_NOT_OPEN | The module is not yet opened. |
Check if the module has been opened. If not, return error.
Return the mutex.
◆ SF_CRYPTO_VersionGet()
Gets the version of Crypto Common Framework module.
- Parameters
-
| [out] | p_version | Pointer to the memory to store the version information. |
- Return values
-
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |
Return the module version.