MCUX CLNS
MCUX Crypto Library Normal Secure
 
Loading...
Searching...
No Matches
mcuxClEls_Hash_HW_Security_Counter_example.c File Reference

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

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

Macros

#define kCDOG_LockCtrl_Unlock
 
#define kCDOG_FaultCtrl_EnableReset
 
#define kCDOG_IrqPauseCtrl_Run
 
#define kCDOG_DebugHaltCtrl_Pause
 

Functions

 MCUXCLEXAMPLE_FUNCTION (mcuxClEls_Hash_HW_Security_Counter_example)
 Performs SHA2-256 hashing using mcuxClEls functions.
 

Variables

static uint8_t const sha256_padded_input [MCUXCLELS_HASH_BLOCK_SIZE_SHA_256]
 Data input for SHA2-256 hashing.
 
static uint8_t sha256_reference_digest [MCUXCLELS_HASH_OUTPUT_SIZE_SHA_256]
 Expected hash value.
 
static uint8_t sha2_256_digest [MCUXCLELS_HASH_STATE_SIZE_SHA_256]
 Destination buffer to receive the hash output of the SHA2-256 hashing.
 

Detailed Description

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

Function Documentation

◆ MCUXCLEXAMPLE_FUNCTION()

MCUXCLEXAMPLE_FUNCTION ( mcuxClEls_Hash_HW_Security_Counter_example  )

Performs SHA2-256 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

Variable Documentation

◆ sha256_padded_input

uint8_t const sha256_padded_input[MCUXCLELS_HASH_BLOCK_SIZE_SHA_256]
static

Data input for SHA2-256 hashing.

◆ sha256_reference_digest

uint8_t sha256_reference_digest[MCUXCLELS_HASH_OUTPUT_SIZE_SHA_256]
static

Expected hash value.

◆ sha2_256_digest

uint8_t sha2_256_digest[MCUXCLELS_HASH_STATE_SIZE_SHA_256]
static

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