57 #ifndef __TC_SHA256_H__ 58 #define __TC_SHA256_H__ 67 #define TC_SHA256_BLOCK_SIZE (64) 68 #define TC_SHA256_DIGEST_SIZE (32) 69 #define TC_SHA256_STATE_BLOCKS (TC_SHA256_DIGEST_SIZE/4) uint8_t leftover[TC_SHA256_BLOCK_SIZE]
Definition: tc_sha256.h:74
struct tc_sha256_state_struct * TCSha256State_t
Definition: tc_sha256.h:78
int tc_sha256_init(TCSha256State_t s)
SHA256 initialization procedure Initializes s.
Definition: tc_sha256.c:40
int tc_sha256_final(uint8_t *digest, TCSha256State_t s)
SHA256 final procedure Inserts the completed hash computation into digest.
Definition: tc_sha256.c:90
Definition: tc_sha256.h:71
#define TC_SHA256_STATE_BLOCKS
Definition: tc_sha256.h:69
unsigned int iv[TC_SHA256_STATE_BLOCKS]
Definition: tc_sha256.h:72
int tc_sha256_update(TCSha256State_t s, const uint8_t *data, size_t datalen)
SHA256 update procedure Hashes data_length bytes addressed by data into state s.
Definition: tc_sha256.c:67
#define TC_SHA256_BLOCK_SIZE
Definition: tc_sha256.h:67
size_t leftover_offset
Definition: tc_sha256.h:75
uint64_t bits_hashed
Definition: tc_sha256.h:73