diff options
author | Jim Meyering <jim@meyering.net> | 2000-10-22 21:09:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-10-22 21:09:43 +0000 |
commit | bf660d1331e6fb052b4ecb8e875b8a93431705b1 (patch) | |
tree | dbbe12b2b554db7d9ffa58d26fa4925e419a4553 /lib | |
parent | 7bb9c7382ff3d4a31aa6e79bd03b2890d5d0ffe6 (diff) | |
download | coreutils-bf660d1331e6fb052b4ecb8e875b8a93431705b1.tar.xz |
(md5_process_block) [OP]: Use `rol', not CYCLIC.
[CYCLIC]: Remove now-unused definition.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/md5.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -304,19 +304,16 @@ md5_process_block (buffer, len, ctx) { \ a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \ ++words; \ - CYCLIC (a, s); \ + a = rol (a, s); \ a += b; \ } \ while (0) - /* It is unfortunate that C does not provide an operator for - cyclic rotation. Hope the C compiler is smart enough. */ -#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) - /* Before we start, one word to the strange constants. They are defined in RFC 1321 as - T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 + T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64, or + perl -e 'foreach(1..64){printf "0x%08x\n", int (4294967296 * abs (sin $_))}' */ /* Round 1. */ @@ -345,7 +342,7 @@ md5_process_block (buffer, len, ctx) do \ { \ a += f (b, c, d) + correct_words[k] + T; \ - CYCLIC (a, s); \ + a = rol (a, s); \ a += b; \ } \ while (0) |