CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
sha256.h File Reference
#include <stddef.h>
#include <stdint.h>
Include dependency graph for sha256.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SHA256_CTX
 

Macros

#define SHA256_BLOCK_SIZE   32
 

Typedefs

typedef uint8_t BYTE
 
typedef uint32_t WORD
 

Functions

void sha256_init (SHA256_CTX *ctx)
 
void sha256_update (SHA256_CTX *ctx, const BYTE data[], size_t len)
 
void sha256_final (SHA256_CTX *ctx, BYTE hash[])
 
void CRYPT_compute_sha256_hash (const uint8_t message[], size_t message_length, uint8_t hash[32])
 Computes the SHA256 hash of the message and stores the 32 byte hash at hash.
 

Macro Definition Documentation

◆ SHA256_BLOCK_SIZE

#define SHA256_BLOCK_SIZE   32

Typedef Documentation

◆ BYTE

typedef uint8_t BYTE

◆ WORD

typedef uint32_t WORD

Function Documentation

◆ CRYPT_compute_sha256_hash()

void CRYPT_compute_sha256_hash ( const uint8_t message[],
size_t message_length,
uint8_t hash[32] )

Computes the SHA256 hash of the message and stores the 32 byte hash at hash.

Parameters
[in]messageThe message to hash
[in]message_lengthLength of the message in bytes
[out]hashWhere the 32 byte hash is stored
Note
Hashing 20x 4 KiB messages takes ~490ms.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sha256_final()

void sha256_final ( SHA256_CTX * ctx,
BYTE hash[] )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sha256_init()

void sha256_init ( SHA256_CTX * ctx)
Here is the caller graph for this function:

◆ sha256_update()

void sha256_update ( SHA256_CTX * ctx,
const BYTE data[],
size_t len )
Here is the call graph for this function:
Here is the caller graph for this function: