49 #define SHA1CircularShift(bits,word) \ 50 ((((word) << (bits)) & 0xFFFFFFFF) | \ 51 ((word) >> (32-(bits)))) 162 while (length-- > 0 && !context->
Corrupted)
223 unsigned A, B, C, D, E;
228 for (t = 0; t < 16; t++)
231 W[t] |= ((unsigned) context->
Message_Block[t * 4 + 1]) << 16;
236 for (t = 16; t < 80; t++)
247 for (t = 0; t < 20; t++)
258 for (t = 20; t < 40; t++)
269 for (t = 40; t < 60; t++)
271 temp =
SHA1CircularShift (5, A) + ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
280 for (t = 60; t < 80; t++)
380 SHA1Input (&context, message_array, length);
407 for (i = 0; i < 5; i++)
409 diff = a_hash->
h[
i] - b_hash->
h[
i];
#define SHA1CircularShift(bits, word)
void SHA1ProcessMessageBlock(SHA1Context *)
void SHA1PadMessage(SHA1Context *)
int SHA1Result(SHA1Context *context)
int SHA1Compute(const unsigned char *message_array, size_t length, SHA1Hash *hash)
unsigned Message_Digest[5]
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
void SHA1Input(SHA1Context *context, const unsigned char *message_array, size_t length)
unsigned char Message_Block[64]
int SHA1Compare(void *a, void *b)
void SHA1Reset(SHA1Context *context)