[PATCH] fio: 'directory' option debug kill
[disktools.git] / md5.h
1 #ifndef MD5_H
2 #define MD5_H
3
4 #define MD5_DIGEST_SIZE         16
5 #define MD5_HMAC_BLOCK_SIZE     64
6 #define MD5_BLOCK_WORDS         16
7 #define MD5_HASH_WORDS          4
8
9 #define F1(x, y, z)     (z ^ (x & (y ^ z)))
10 #define F2(x, y, z)     F1(z, x, y)
11 #define F3(x, y, z)     (x ^ y ^ z)
12 #define F4(x, y, z)     (y ^ (x | ~z))
13
14 #define MD5STEP(f, w, x, y, z, in, s) \
15         (w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x)
16
17 struct md5_ctx {
18         __u32 hash[MD5_HASH_WORDS];
19         __u32 block[MD5_BLOCK_WORDS];
20         __u64 byte_count;
21 };
22
23 extern void md5_update(struct md5_ctx *, const __u8 *, unsigned int);
24
25 #endif