diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-04 05:39:07 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-04 05:39:07 +0000 |
commit | 6a9740567292a983b05533901dc7a687ec2fb68c (patch) | |
tree | 942771c90c0eff8fc776a1b631e9032e60641ea7 /lib/sha1.c | |
parent | 8e19f6282b0621f63b47716bd2eadfb9d466c758 (diff) | |
download | coreutils-6a9740567292a983b05533901dc7a687ec2fb68c.tar.xz |
Sync from gnulib.
Diffstat (limited to 'lib/sha1.c')
-rw-r--r-- | lib/sha1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sha1.c b/lib/sha1.c index 509911d87..dadf97361 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -270,10 +270,10 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) /* --- Code below is the primary difference between md5.c and sha1.c --- */ /* SHA1 round constants */ -#define K1 0x5a827999L -#define K2 0x6ed9eba1L -#define K3 0x8f1bbcdcL -#define K4 0xca62c1d6L +#define K1 0x5a827999 +#define K2 0x6ed9eba1 +#define K3 0x8f1bbcdc +#define K4 0xca62c1d6 /* Round functions. Note that F2 is the same as F4. */ #define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) ) @@ -305,7 +305,7 @@ sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) if (ctx->total[0] < len) ++ctx->total[1]; -#define rol(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n)))) #define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \ |