Commit | Line | Data |
---|---|---|
7c353ceb JA |
1 | #ifndef FIO_SHA1 |
2 | #define FIO_SHA1 | |
3 | ||
4 | /* | |
5 | * Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h), | |
6 | * optimized to do word accesses rather than byte accesses, | |
7 | * and to avoid unnecessary copies into the context array. | |
8 | */ | |
9 | ||
25dfa848 | 10 | struct fio_sha1_ctx { |
7c353ceb JA |
11 | uint32_t *H; |
12 | unsigned int W[16]; | |
13 | unsigned long long size; | |
14 | }; | |
15 | ||
25dfa848 JA |
16 | void fio_sha1_init(struct fio_sha1_ctx *); |
17 | void fio_sha1_update(struct fio_sha1_ctx *, const void *dataIn, unsigned long len); | |
11d8c1f2 | 18 | void fio_sha1_final(struct fio_sha1_ctx *); |
7c353ceb JA |
19 | |
20 | #endif |