Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/crypto: md5: Use rol32() instead of open-coding it

For the bitwise left rotation in MD5STEP, use rol32() from
<linux/bitops.h> instead of open-coding it.

Signed-off-by: Rusydi H. Makarim <rusydi.makarim@kriptograf.id>
Link: https://lore.kernel.org/r/20251214-rol32_in_md5-v1-1-20f5f11a92b2@kriptograf.id
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

authored by

Rusydi H. Makarim and committed by
Eric Biggers
c8bf0b96 0d8e6c0a

+1 -1
+1 -1
lib/crypto/md5.c
··· 29 29 #define F4(x, y, z) (y ^ (x | ~z)) 30 30 31 31 #define MD5STEP(f, w, x, y, z, in, s) \ 32 - (w += f(x, y, z) + in, w = (w << s | w >> (32 - s)) + x) 32 + (w += f(x, y, z) + in, w = rol32(w, s) + x) 33 33 34 34 static void md5_block_generic(struct md5_block_state *state, 35 35 const u8 data[MD5_BLOCK_SIZE])