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