Functions | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha_SetMode (cy_en_cryptolite_sha_mode_t mode, cy_stc_cryptolite_sha_context_t *shaContext) |
The function sets the SHA mode of operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha_Init (CRYPTOLITE_Type *base, cy_stc_cryptolite_sha_context_t *shaContext) |
The function to initialize the SHA operation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha_Start (CRYPTOLITE_Type *base, cy_stc_cryptolite_sha_context_t *shaContext) |
Initializes the initial Hash vector. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha_Update (CRYPTOLITE_Type *base, uint8_t const *message, uint32_t messageSize, cy_stc_cryptolite_sha_context_t *shaContext) |
Performs the SHA calculation on one message based on the selected SHA mode. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha_Finish (CRYPTOLITE_Type *base, uint8_t *digest, cy_stc_cryptolite_sha_context_t *shaContext) |
Completes the SHA calculation. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha_Free (CRYPTOLITE_Type *base, cy_stc_cryptolite_sha_context_t *shaContext) |
Clears the used memory and context data. More... | |
cy_en_cryptolite_status_t | Cy_Cryptolite_Sha (CRYPTOLITE_Type *base, uint8_t const *message, uint32_t messageSize, uint8_t *digest, cy_stc_cryptolite_sha_context_t *shaContext) |
This function performs the SHA256, SHA384 or SHA512 Hash function based on the SHA mode selected. More... | |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha_SetMode | ( | cy_en_cryptolite_sha_mode_t | mode, |
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
The function sets the SHA mode of operation.
mode | SHA selection mode(SHA256, SHA384, SHA512). |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha_Init | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
The function to initialize the SHA operation.
base | The pointer to the Cryptolite instance. |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha_Start | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
Initializes the initial Hash vector.
base | The pointer to the CRYPTOLITE instance. |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha_Update | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
Performs the SHA calculation on one message based on the selected SHA mode.
base | The pointer to the CRYPTOLITE instance. |
message | The pointer to the message whose Hash is being computed. |
messageSize | The size of the message whose Hash is being computed. |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha_Finish | ( | CRYPTOLITE_Type * | base, |
uint8_t * | digest, | ||
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
Completes the SHA calculation.
base | The pointer to the CRYPTOLITE instance. |
digest | The pointer to the calculated Hash digest. |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha_Free | ( | CRYPTOLITE_Type * | base, |
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
Clears the used memory and context data.
base | The pointer to the CRYPTOLITE instance. |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |
cy_en_cryptolite_status_t Cy_Cryptolite_Sha | ( | CRYPTOLITE_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t * | digest, | ||
cy_stc_cryptolite_sha_context_t * | shaContext | ||
) |
This function performs the SHA256, SHA384 or SHA512 Hash function based on the SHA mode selected.
Provide the required parameters and the pointer to the context structure when making this function call. It is independent of the previous Crypto state because it already contains preparation, calculation, and finalization steps.
base | The pointer to the CRYPTOLITE instance. |
message | The pointer to a message whose hash value is being computed. |
messageSize | The size of a message in bytes. |
digest | The pointer to the hash digest. |
shaContext | The pointer to the cy_stc_cryptolite_sha_context_t structure that stores all internal variables for Cryptolite driver. |