Commit | Line | Data |
---|---|---|
1 | #ifndef FIO_SHA256_H | |
2 | #define FIO_SHA256_H | |
3 | ||
4 | #define SHA256_DIGEST_SIZE 32 | |
5 | #define SHA256_BLOCK_SIZE 64 | |
6 | ||
7 | struct fio_sha256_ctx { | |
8 | uint32_t count; | |
9 | uint32_t state[SHA256_DIGEST_SIZE / 4]; | |
10 | uint8_t *buf; | |
11 | }; | |
12 | ||
13 | void fio_sha256_init(struct fio_sha256_ctx *); | |
14 | void fio_sha256_update(struct fio_sha256_ctx *, const uint8_t *, unsigned int); | |
15 | void fio_sha256_final(struct fio_sha256_ctx *); | |
16 | ||
17 | #endif |