diff options
Diffstat (limited to 'lib/halfmd4.c')
| -rw-r--r-- | lib/halfmd4.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/halfmd4.c b/lib/halfmd4.c index a8fe6274a13c..137e861d9690 100644 --- a/lib/halfmd4.c +++ b/lib/halfmd4.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #include <linux/compiler.h> | 1 | #include <linux/compiler.h> |
| 2 | #include <linux/export.h> | 2 | #include <linux/export.h> |
| 3 | #include <linux/cryptohash.h> | 3 | #include <linux/cryptohash.h> |
| 4 | #include <linux/bitops.h> | ||
| 4 | 5 | ||
| 5 | /* F, G and H are basic MD4 functions: selection, majority, parity */ | 6 | /* F, G and H are basic MD4 functions: selection, majority, parity */ |
| 6 | #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) | 7 | #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) |
| @@ -14,7 +15,7 @@ | |||
| 14 | * Rotation is separate from addition to prevent recomputation | 15 | * Rotation is separate from addition to prevent recomputation |
| 15 | */ | 16 | */ |
| 16 | #define ROUND(f, a, b, c, d, x, s) \ | 17 | #define ROUND(f, a, b, c, d, x, s) \ |
| 17 | (a += f(b, c, d) + x, a = (a << s) | (a >> (32 - s))) | 18 | (a += f(b, c, d) + x, a = rol32(a, s)) |
| 18 | #define K1 0 | 19 | #define K1 0 |
| 19 | #define K2 013240474631UL | 20 | #define K2 013240474631UL |
| 20 | #define K3 015666365641UL | 21 | #define K3 015666365641UL |
