rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #include <sys/types.h> |
2 | |||||
3 | #define SHA256_BLOCK_SIZE 64 | ||||
4 | |||||
5 | struct sha256_context { | ||||
6 | u32 state[8]; | ||||
7 | u64 count; | ||||
8 | u8 buf[SHA256_BLOCK_SIZE]; | ||||
9 | }; | ||||
10 | |||||
11 | int sha256_start(struct sha256_context *s_ctx); | ||||
12 | int sha256_process(struct sha256_context *s_ctx, const u8 *input, unsigned int len); | ||||
13 | int sha256_end(struct sha256_context *s_ctx, u8 *out); |