Firmware SDK
twr_sha256

Library for SHA256 hash. More...

Functions

void twr_sha256_init (twr_sha256_t *self)
 Initialize SHA256 structure. More...
 
void twr_sha256_update (twr_sha256_t *self, const void *buffer, size_t length)
 Compute SHA256 from data. More...
 
void twr_sha256_final (twr_sha256_t *self, uint8_t *hash, bool little_endian)
 Finalize SHA256 computation and read the final hash. More...
 

Detailed Description

Library for SHA256 hash.

Function Documentation

◆ twr_sha256_final()

void twr_sha256_final ( twr_sha256_t *  self,
uint8_t *  hash,
bool  little_endian 
)

Finalize SHA256 computation and read the final hash.

Parameters
[in]selfSHA256 instance
[in]hashpointer to the array where the hash will be copied
[in]little_endianendian format

Definition at line 58 of file twr_sha256.c.

Referenced by twr_config_load(), and twr_config_save().

Here is the caller graph for this function:

◆ twr_sha256_init()

void twr_sha256_init ( twr_sha256_t *  self)

Initialize SHA256 structure.

Parameters
[in]selfSHA256 instance

Definition at line 26 of file twr_sha256.c.

Referenced by twr_config_load(), and twr_config_save().

Here is the caller graph for this function:

◆ twr_sha256_update()

void twr_sha256_update ( twr_sha256_t *  self,
const void *  buffer,
size_t  length 
)

Compute SHA256 from data.

Parameters
[in]selfSHA256 instance
[in]bufferdata
[in]lengthdata length

Definition at line 40 of file twr_sha256.c.

Referenced by twr_config_load(), and twr_config_save().

Here is the caller graph for this function: