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

Example of SHA2-256 hashing using the CSSv2 (CLNS component mcuxClCss) More...

#include <mcuxClCss.h>
#include <mcuxCsslFlowProtection.h>
#include <stdbool.h>

Functions

bool hash_sha256_one_block (void)
 Performs SHA2-256 hashing using mcuxClCss functions. More...
 

Variables

static uint8_t const sha256_padded_input [MCUXCLCSS_HASH_BLOCK_SIZE_SHA_256]
 Data input for SHA2-256 hashing. More...
 
static uint8_t sha256_reference_digest [MCUXCLCSS_HASH_OUTPUT_SIZE_SHA_256]
 Expected hash value. More...
 
static uint8_t sha2_256_digest [MCUXCLCSS_HASH_STATE_SIZE_SHA_256]
 Destination buffer to receive the hash output of the SHA2-256 hashing. More...
 

Detailed Description

Example of SHA2-256 hashing using the CSSv2 (CLNS component mcuxClCss)

Function Documentation

◆ hash_sha256_one_block()

bool hash_sha256_one_block ( void  )

Performs SHA2-256 hashing using mcuxClCss functions.

Return values
trueThe example code completed successfully
falseThe example code failed
Examples
hash_sha256_one_block.c.

Variable Documentation

◆ sha256_padded_input

uint8_t const sha256_padded_input[MCUXCLCSS_HASH_BLOCK_SIZE_SHA_256]
static

Data input for SHA2-256 hashing.

Examples
hash_sha256_one_block.c.

◆ sha256_reference_digest

uint8_t sha256_reference_digest[MCUXCLCSS_HASH_OUTPUT_SIZE_SHA_256]
static

Expected hash value.

Examples
hash_sha256_one_block.c.

◆ sha2_256_digest

uint8_t sha2_256_digest[MCUXCLCSS_HASH_STATE_SIZE_SHA_256]
static

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

Examples
hash_sha256_one_block.c.