30 #define f1(x,y,z) ((x & y) | (~x & z)) 31 #define f2(x,y,z) (x ^ y ^ z) 32 #define f3(x,y,z) ((x & y) | (x & z) | (y & z)) 33 #define f4(x,y,z) (x ^ y ^ z) 37 #define CONST1 0x5a827999L 38 #define CONST2 0x6ed9eba1L 39 #define CONST3 0x8f1bbcdcL 40 #define CONST4 0xca62c1d6L 44 #define ROT32(x,n) ((x << n) | (x >> (32 - n))) 47 temp = ROT32(A,5) + f##n(B,C,D) + E + W[i] + CONST##n; \ 48 E = D; D = C; C = ROT32(B,30); B = A; A = temp 85 tmp |= (0xFF & *p2++) << 8;
86 tmp |= (0xFF & *p2++) << 16;
87 tmp |= (0xFF & *p2++) << 24;
101 for (i = 0; i < 16; ++i)
105 for (i = 16; i < 80; ++i)
107 W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
115 for (i = 0; i < 20; ++i)
119 for (i = 20; i < 40; ++i)
123 for (i = 40; i < 60; ++i)
127 for (i = 60; i < 80; ++i)
185 count = (int) ((lo_bit_count >> 3) & 0x3f);
210 for (j = 0; j <
VSIZE; j++)
void local_memset(INT32 *s, int c, int n, int e)
const BYTE indata[VSIZE][BLOCK_SIZE]
static void sha_transform()
void sha_update(const BYTE *buffer, int count)
void local_memcpy(INT32 *s1, const BYTE *s2, int n)