|
#define | rol(value, bits) (_rotl((value), (bits))) |
|
#define | DWORD2BE(x) (((x) >> 24) & 0xff) | (((x) >> 8) & 0xff00) | (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000); |
|
#define | blk0(i) (Block[i] = (rol(Block[i],24)&0xFF00FF00)|(rol(Block[i],8)&0x00FF00FF)) |
|
#define | blk1(i) (Block[i&15] = rol(Block[(i+13)&15]^Block[(i+8)&15]^Block[(i+2)&15]^Block[i&15],1)) |
|
#define | f1(x, y, z) (z^(x&(y^z))) |
|
#define | f2(x, y, z) (x^y^z) |
|
#define | f3(x, y, z) ((x&y)|(z&(x|y))) |
|
#define | f4(x, y, z) (x^y^z) |
|
#define | R0(v, w, x, y, z, i) z+=f1(w,x,y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); |
|
#define | R1(v, w, x, y, z, i) z+=f1(w,x,y)+blk1(i)+0x5A827999+rol(v,5);w=rol(w,30); |
|
#define | R2(v, w, x, y, z, i) z+=f2(w,x,y)+blk1(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); |
|
#define | R3(v, w, x, y, z, i) z+=f3(w,x,y)+blk1(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); |
|
#define | R4(v, w, x, y, z, i) z+=f4(w,x,y)+blk1(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); |
|