![]() |
Synergy Software Package User's Manual
|
#include <sf_crypto_api.h>
Data Fields | |
| ssp_err_t(* | open )(sf_crypto_ctrl_t *const p_ctrl, sf_crypto_cfg_t const *const p_cfg) |
| ssp_err_t(* | close )(sf_crypto_ctrl_t *const p_ctrl) |
| ssp_err_t(* | lock )(sf_crypto_ctrl_t *const p_ctrl) |
| ssp_err_t(* | unlock )(sf_crypto_ctrl_t *const p_ctrl) |
| ssp_err_t(* | versionGet )(ssp_version_t *const p_version) |
| ssp_err_t(* | statusGet )(sf_crypto_ctrl_t *const p_ctrl, sf_crypto_state_t *p_status) |
Shared Interface definition for the SSP Crypto Framework Common Module
| ssp_err_t(* sf_crypto_api_t::close) (sf_crypto_ctrl_t *const p_ctrl) |
Close SSP Crypto Framework Common Module. This function is to be called only once when the the Crypto services are no longer required.
| [in,out] | p_ctrl | Pointer to a Crypto framework control block. |
| ssp_err_t(* sf_crypto_api_t::lock) (sf_crypto_ctrl_t *const p_ctrl) |
Lock shared resources for Cryptography operations. This function is typically called by Crypto Framework modules (SF_CRYPTO_XXX) to protect shared software resources provided in Crypto Framework Common module or shared crypto hardware engine. Once lock() is called by a thread, any Crypto Framework services called by the other thread will be blocked until unlock() is called. The lock and unlock operations are managed by Crypto Framework modules so users do not need to call this function in typical use-cases. However, if this function is called by a user thread, users must be aware that any cryptography operations by the other threads will be locked out until unlock() is called by the thread which called lock().
| [in,out] | p_ctrl | Pointer to a Crypto framework control block. |
| ssp_err_t(* sf_crypto_api_t::open) (sf_crypto_ctrl_t *const p_ctrl, sf_crypto_cfg_t const *const p_cfg) |
Open SSP Crypto Framework Common Module. This function is to be called only once to initialize the Crypto services.
| [in,out] | p_ctrl | Pointer to a Crypto framework control block. Must be declared by user. |
| [in] | p_cfg | Pointer to a Crypto framework configuration structure. All elements of this structure must be set by user. |
| ssp_err_t(* sf_crypto_api_t::statusGet) (sf_crypto_ctrl_t *const p_ctrl, sf_crypto_state_t *p_status) |
Get status of SSP Crypto Framework Common Module.
| [in] | p_ctrl | Pointer to a Crypto framework control block. |
| [out] | p_status | Memory location to store module status. |
| ssp_err_t(* sf_crypto_api_t::unlock) (sf_crypto_ctrl_t *const p_ctrl) |
Unlock shared resources for Cryptography operations. This function is typically called by Crypto Framework modules (SF_CRYPTO_XXX) to allow any other threads to access to shared software resources provided in Crypto Framework Common module or shared crypto hardware engine. This function must be called by a thread which called lock(). The lock and unlock operations are managed by Crypto Framework modules so users do not need to call this function in typical use-cases. However, this function must be called by a user thread if the thread has ever called lock().
| [in,out] | p_ctrl | Pointer to a Crypto framework control block. |
| ssp_err_t(* sf_crypto_api_t::versionGet) (ssp_version_t *const p_version) |
Get version of SSP Crypto Framework Common Module.
| [out] | p_version | Pointer to the memory to store the version information. |