Commit | Line | Data |
---|---|---|
cd14cc10 JA |
1 | #ifndef FIO_SHA256_H |
2 | #define FIO_SHA256_H | |
3 | ||
3d2d14bc SW |
4 | #include <inttypes.h> |
5 | ||
f99d67f9 JA |
6 | #define SHA256_DIGEST_SIZE 32 |
7 | #define SHA256_BLOCK_SIZE 64 | |
8 | ||
25dfa848 | 9 | struct fio_sha256_ctx { |
f99d67f9 JA |
10 | uint32_t count; |
11 | uint32_t state[SHA256_DIGEST_SIZE / 4]; | |
cd14cc10 JA |
12 | uint8_t *buf; |
13 | }; | |
14 | ||
25dfa848 JA |
15 | void fio_sha256_init(struct fio_sha256_ctx *); |
16 | void fio_sha256_update(struct fio_sha256_ctx *, const uint8_t *, unsigned int); | |
f99d67f9 | 17 | void fio_sha256_final(struct fio_sha256_ctx *); |
cd14cc10 JA |
18 | |
19 | #endif |