# HG changeset patch # User michael # Date 1173737673 0 # Node ID 10b34dc4ecd230c506776fecab8eea1b6307d88d # Parent 5a85142df2367d93202b1056e95a942a35056219 cosmetic cleanup diff -r 5a85142df236 -r 10b34dc4ecd2 sha1.c --- a/sha1.c Mon Mar 12 22:12:36 2007 +0000 +++ b/sha1.c Mon Mar 12 22:14:33 2007 +0000 @@ -13,14 +13,10 @@ #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) -/* blk0() and blk() perform the initial expand. */ -/* I got the idea of expanding during the round function from SSLeay */ -#define blk0(i) (block[i]) #define blk(i) (block[i]) /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ -#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y) +blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); -#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y) +blk (i)+0x5A827999+rol(v,5);w=rol(w,30); +#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y) +blk (i)+0x5A827999+rol(v,5);w=rol(w,30); #define R2(v,w,x,y,z,i) z+=( w^x ^y) +blk (i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk (i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); #define R4(v,w,x,y,z,i) z+=( w^x ^y) +blk (i)+0xCA62C1D6+rol(v,5);w=rol(w,30);