Functions | |
cy_en_crypto_status_t | Cy_Crypto_Sha (CRYPTO_Type *base, uint8_t const *message, uint32_t messageSize, uint8_t *digest, cy_en_crypto_sha_mode_t mode) |
This function calculates the secure hash algorithm (SHA) hash for the given message. More... | |
cy_en_crypto_status_t | Cy_Crypto_Sha_Init (CRYPTO_Type *base, cy_en_crypto_sha_mode_t mode, cy_stc_crypto_sha_context_t *shaContext) |
This function initializes the SHA operation. More... | |
cy_en_crypto_status_t | Cy_Crypto_Sha_Partial (CRYPTO_Type *base, uint8_t const *message, uint32_t messageSize, cy_stc_crypto_sha_context_t *shaContext) |
This function performs the SHA Hash calculation on partial data which is part of a complete message. More... | |
cy_en_crypto_status_t | Cy_Crypto_Sha_Finish (CRYPTO_Type *base, uint8_t *digest, cy_stc_crypto_sha_context_t *shaContext) |
This function completes the SHA hash calculation for the message provided with Cy_Crypto_Sha_Partial() function. More... | |
cy_en_crypto_status_t | Cy_Crypto_Sha_Free (CRYPTO_Type *base, cy_stc_crypto_sha_context_t *shaContext) |
This function clears the SHA operation context. More... | |
cy_en_crypto_status_t Cy_Crypto_Sha | ( | CRYPTO_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
uint8_t * | digest, | ||
cy_en_crypto_sha_mode_t | mode | ||
) |
This function calculates the secure hash algorithm (SHA) hash for the given message.
This function can be called without calling Cy_Crypto_Sha_Init().
base | Base address of the Crypto block registers |
mode | SHA mode. cy_en_crypto_sha_mode_t |
message | Pointer to the message whose hash value is being computed |
messageSize | Size of the message in bytes |
digest | Pointer to store the calculated hash digest |
cy_en_crypto_status_t Cy_Crypto_Sha_Init | ( | CRYPTO_Type * | base, |
cy_en_crypto_sha_mode_t | mode, | ||
cy_stc_crypto_sha_context_t * | shaContext | ||
) |
This function initializes the SHA operation.
base | Base address of the Crypto block registers |
mode | SHA mode. cy_en_crypto_sha_mode_t |
shaContext | Pointer to the SHA context structure cy_stc_crypto_sha_context_t allocated by the user. This structure is used by the Crypto driver for the SHA hash calculation. Do not modify the values of this structure. |
cy_en_crypto_status_t Cy_Crypto_Sha_Partial | ( | CRYPTO_Type * | base, |
uint8_t const * | message, | ||
uint32_t | messageSize, | ||
cy_stc_crypto_sha_context_t * | shaContext | ||
) |
This function performs the SHA Hash calculation on partial data which is part of a complete message.
Cy_Crypto_Sha_Init() must be called before calling this function. This function can be called multiple times with partial data and at the end, the user must call Cy_Crypto_Sha_Finish() to get the final SHA hash digest.
base | Base address of the Crypto block registers |
shaContext | Pointer to the SHA context structure cy_stc_crypto_sha_context_t allocated by the user. This structure is used by the Crypto driver for the SHA hash calculation. Do not modify the values of this structure. |
message | Pointer to the message whose Hash is being computed |
messageSize | Size (in bytes) of the message whose Hash is being computed |
cy_en_crypto_status_t Cy_Crypto_Sha_Finish | ( | CRYPTO_Type * | base, |
uint8_t * | digest, | ||
cy_stc_crypto_sha_context_t * | shaContext | ||
) |
This function completes the SHA hash calculation for the message provided with Cy_Crypto_Sha_Partial() function.
base | Base address of the Crypto block registers |
shaContext | Pointer to the SHA context structure cy_stc_crypto_sha_context_t allocated by the user. This structure is used by the Crypto driver for the SHA hash calculation. Do not modify the values of this structure. |
digest | Pointer to store the calculated Hash digest |
cy_en_crypto_status_t Cy_Crypto_Sha_Free | ( | CRYPTO_Type * | base, |
cy_stc_crypto_sha_context_t * | shaContext | ||
) |
This function clears the SHA operation context.
base | Base address of the Crypto block registers |
shaContext | Pointer to the SHA context structure cy_stc_crypto_sha_context_t allocated by the user. This structure is used by the Crypto driver for the SHA hash calculation. Do not modify the values of this structure. |