Synergy Software Package User's Manual

#include <sf_crypto_hash_api.h>

Data Fields

ssp_err_t(* open )(sf_crypto_hash_ctrl_t *const p_ctrl, sf_crypto_hash_cfg_t const *const p_cfg)
 
ssp_err_t(* close )(sf_crypto_hash_ctrl_t *const p_ctrl)
 
ssp_err_t(* hashInit )(sf_crypto_hash_ctrl_t *const p_ctrl)
 
ssp_err_t(* hashUpdate )(sf_crypto_hash_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_data_in)
 
ssp_err_t(* hashFinal )(sf_crypto_hash_ctrl_t *const p_ctrl, sf_crypto_data_handle_t *const p_msg_digest, uint32_t *p_size)
 
ssp_err_t(* versionGet )(ssp_version_t *const p_version)
 

Detailed Description

Shared Interface definition for the SSP SSP Crypto framework

Field Documentation

◆ close

ssp_err_t(* sf_crypto_hash_api_t::close) (sf_crypto_hash_ctrl_t *const p_ctrl)

Closes SSP Crypto HASH framework. This function de-initializes a control block of the framework module and allow users to re-configure the module differently. For instance, users can close the module and re-open it with different HASH algorithm for a new digest operation.

Implemented as
Parameters
[in,out]p_ctrlPointer to Crypto HASH Framework control block structure.

◆ hashFinal

ssp_err_t(* sf_crypto_hash_api_t::hashFinal) (sf_crypto_hash_ctrl_t *const p_ctrl, sf_crypto_data_handle_t *const p_msg_digest, uint32_t *p_size)

Hashes the last block of data and returns a message digest in the output buffer. Once hashFinal() is called, no additional call of hashUpdate() is allowed but hashInit() can be called to initialize a new digest operation unless the other HASH algorithm type needed. If the other HASH algorithm is required for a new digest operation, call close() and open(). This is a blocking call.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto HASH Framework control block structure.
[in,out]p_msg_digestPointer to an output data buffer and the buffer size. Message digest will be generated in the buffer. Data buffer must be aligned to word alignment and the size must be sufficient to store the message digest.
[out]p_sizePointer to the 32-bit memory space to store the size of message digest.

◆ hashInit

ssp_err_t(* sf_crypto_hash_api_t::hashInit) (sf_crypto_hash_ctrl_t *const p_ctrl)

Initializes a message digest operation. Must be called once open() or hashFinal() is called to initialize a new digest operation. Unless a different HASH type is used, users do not need to close the module for a new digest operation but can call this function to restart another digest operation. This is a blocking call.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto HASH Framework control block structure.

◆ hashUpdate

ssp_err_t(* sf_crypto_hash_api_t::hashUpdate) (sf_crypto_hash_ctrl_t *const p_ctrl, sf_crypto_data_handle_t const *const p_data_in)

Hashes input data and saves it in an internal context buffer. Can be called multiple times for additional blocks of data. This is a blocking call.

Implemented as
Parameters
[in]p_ctrlPointer to Crypto HASH Framework control block structure.
[in]p_data_inPointer to an input data buffer and the data length.

◆ open

ssp_err_t(* sf_crypto_hash_api_t::open) (sf_crypto_hash_ctrl_t *const p_ctrl, sf_crypto_hash_cfg_t const *const p_cfg)

Opens SSP Crypto HASH framework. This function initializes a control block of the framework module based on the configuration parameters such as the HASH algorithm type. The module allows users to have multiple instances with different control blocks, if required.

Implemented as
Parameters
[in,out]p_ctrlPointer to Crypto HASH Framework control block structure.
[in]p_cfgPointer to sf_crypto_hash_cfg_t configuration structure. All elements of this structure must be set by user.

◆ versionGet

ssp_err_t(* sf_crypto_hash_api_t::versionGet) (ssp_version_t *const p_version)

Get version of SSP Crypto HASH framework.

Implemented as
Parameters
[in]p_versionPointer to the memory to store the module version.

The documentation for this struct was generated from the following file: