MCPcopy Create free account
hub / github.com/diasurgical/devilution / SHA1Input

Function SHA1Input

Source/sha.cpp:56–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void SHA1Input(SHA1Context *context, const char *message_array, int len)
57{
58 int i, count;
59
60 count = context->count[0] + 8 * len;
61 if (count < context->count[0])
62 context->count[1]++;
63
64 context->count[0] = count;
65 context->count[1] += len >> 29;
66
67 for (i = len; i >= 64; i -= 64) {
68 memcpy(context->buffer, message_array, sizeof(context->buffer));
69 SHA1ProcessMessageBlock(context);
70 message_array += 64;
71 }
72}
73
74void SHA1ProcessMessageBlock(SHA1Context *context)
75{

Callers 1

SHA1CalculateFunction · 0.85

Calls 1

SHA1ProcessMessageBlockFunction · 0.85

Tested by

no test coverage detected