28 #ifndef SHA2_ROUTINES_H 29 #define SHA2_ROUTINES_H 33 #define SHA256_DIGEST_SIZE (32) 34 #define SHA256_BLOCK_SIZE (64) 60 #endif // SHA2_ROUTINES_H void sw_sha256(const uint8_t *message, unsigned int len, uint8_t digest[SHA256_DIGEST_SIZE])
single call convenience function which computes Hash of given data using SHA256 software ...
Definition: sha2_routines.c:248
#define SHA256_BLOCK_SIZE
Definition: sha2_routines.h:34
#define SHA256_DIGEST_SIZE
Definition: sha2_routines.h:33
void sw_sha256_final(sw_sha256_ctx *ctx, uint8_t digest[SHA256_DIGEST_SIZE])
completes the final SHA256 calculation and returns the final digest/hash
Definition: sha2_routines.c:202
uint32_t block_size
Number of bytes in current block.
Definition: sha2_routines.h:43
uint32_t total_msg_size
Total number of message bytes processed.
Definition: sha2_routines.h:42
void sw_sha256_update(sw_sha256_ctx *ctx, const uint8_t *message, uint32_t len)
updates the running hash with the next block of data, called iteratively for the entire stream of dat...
Definition: sha2_routines.c:167
Definition: sha2_routines.h:40
void sw_sha256_init(sw_sha256_ctx *ctx)
Intialize the software SHA256.
Definition: sha2_routines.c:144