MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClEls_Hash_Sha384_One_Block_example.c File Reference

Example of SHA2-384 hashing using the ELS (CLNS component mcuxClEls) More...

#include <mcuxClEls.h>
#include <mcuxCsslFlowProtection.h>
#include <mcuxClCore_FunctionIdentifiers.h>
#include <mcuxClCore_Examples.h>
#include <mcuxClExample_ELS_Helper.h>

Functions

 MCUXCLEXAMPLE_FUNCTION (mcuxClEls_Hash_Sha384_One_Block_example)
 Performs SHA2-384 hashing using mcuxClEls functions. More...
 

Variables

static uint8_t const sha384_padded_input [MCUXCLELS_HASH_BLOCK_SIZE_SHA_384]
 Data input for SHA2-384 hashing. More...
 
static uint8_t sha384_reference_digest [MCUXCLELS_HASH_OUTPUT_SIZE_SHA_384]
 Expected hash value. More...
 
static uint8_t sha2_384_digest [MCUXCLELS_HASH_STATE_SIZE_SHA_384]
 Destination buffer to receive the hash output of the SHA2-384 hashing. More...
 

Detailed Description

Example of SHA2-384 hashing using the ELS (CLNS component mcuxClEls)

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClEls_Hash_Sha384_One_Block_example  )

Performs SHA2-384 hashing using mcuxClEls functions.

Return values
MCUXCLEXAMPLE_STATUS_OKThe example code completed successfully
MCUXCLEXAMPLE_STATUS_ERRORThe example code failed

Initialize ELS, Enable the ELS

Disable the ELS

Examples
mcuxClEls_Hash_Sha384_One_Block_example.c.

Variable Documentation

◆ sha384_padded_input

uint8_t const sha384_padded_input[MCUXCLELS_HASH_BLOCK_SIZE_SHA_384]
static

Data input for SHA2-384 hashing.

Examples
mcuxClEls_Hash_Sha384_One_Block_example.c.

◆ sha384_reference_digest

uint8_t sha384_reference_digest[MCUXCLELS_HASH_OUTPUT_SIZE_SHA_384]
static

Expected hash value.

Examples
mcuxClEls_Hash_Sha384_One_Block_example.c.

◆ sha2_384_digest

uint8_t sha2_384_digest[MCUXCLELS_HASH_STATE_SIZE_SHA_384]
static

Destination buffer to receive the hash output of the SHA2-384 hashing.

Examples
mcuxClEls_Hash_Sha384_One_Block_example.c.