fio: fix aio trim completion latencies
[fio.git] / crc / sha1.h
1 #ifndef FIO_SHA1
2 #define FIO_SHA1
3
4 #include <inttypes.h>
5
6 /*
7  * Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
8  * optimized to do word accesses rather than byte accesses,
9  * and to avoid unnecessary copies into the context array.
10  */
11
12 struct fio_sha1_ctx {
13         uint32_t *H;
14         unsigned int W[16];
15         unsigned long long size;
16 };
17
18 void fio_sha1_init(struct fio_sha1_ctx *);
19 void fio_sha1_update(struct fio_sha1_ctx *, const void *dataIn, unsigned long len);
20 void fio_sha1_final(struct fio_sha1_ctx *);
21
22 #endif