Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_sha256.h
1 #ifndef _BC_SHA256_H
2 #define _BC_SHA256_H
3 
4 #include "bc_common.h"
5 
9 
11 
12 typedef struct
13 {
14  uint8_t _buffer[64];
15  size_t _length;
16  uint64_t _bit_length;
17  uint32_t _state[8];
18 
19 } bc_sha256_t;
20 
22 
25 
26 void bc_sha256_init(bc_sha256_t *self);
27 
32 
33 void bc_sha256_update(bc_sha256_t *self, const void *buffer, size_t length);
34 
39 
40 void bc_sha256_final(bc_sha256_t *self, uint8_t *hash, bool little_endian);
41 
43 
44 #endif
void bc_sha256_update(bc_sha256_t *self, const void *buffer, size_t length)
Compute SHA256 from data.
Definition: bc_sha256.c:40
void bc_sha256_final(bc_sha256_t *self, uint8_t *hash, bool little_endian)
Finalize SHA256 computation and read the final hash.
Definition: bc_sha256.c:58
void bc_sha256_init(bc_sha256_t *self)
Initialize SHA256 structure.
Definition: bc_sha256.c:26