fio: fix aio trim completion latencies
[fio.git] / crc / sha1.h
CommitLineData
7c353ceb
JA
1#ifndef FIO_SHA1
2#define FIO_SHA1
3
3d2d14bc
SW
4#include <inttypes.h>
5
7c353ceb
JA
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
25dfa848 12struct fio_sha1_ctx {
7c353ceb
JA
13 uint32_t *H;
14 unsigned int W[16];
15 unsigned long long size;
16};
17
25dfa848
JA
18void fio_sha1_init(struct fio_sha1_ctx *);
19void fio_sha1_update(struct fio_sha1_ctx *, const void *dataIn, unsigned long len);
11d8c1f2 20void fio_sha1_final(struct fio_sha1_ctx *);
7c353ceb
JA
21
22#endif