sha1: fixed libstrophe build issues on Windows
Backported from NetXMS.
This commit is contained in:
@@ -197,8 +197,9 @@ void crypto_SHA1_Update(SHA1_CTX* context, const uint8_t* data,
|
|||||||
size_t i, j;
|
size_t i, j;
|
||||||
|
|
||||||
j = (context->count[0] >> 3) & 63;
|
j = (context->count[0] >> 3) & 63;
|
||||||
if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
|
if ((context->count[0] += (uint32_t)len << 3) < ((uint32_t)len << 3))
|
||||||
context->count[1] += (len >> 29);
|
context->count[1]++;
|
||||||
|
context->count[1] += (uint32_t)(len >> 29);
|
||||||
if ((j + len) > 63) {
|
if ((j + len) > 63) {
|
||||||
memcpy(&context->buffer[j], data, (i = 64-j));
|
memcpy(&context->buffer[j], data, (i = 64-j));
|
||||||
SHA1_Transform(context->state, context->buffer);
|
SHA1_Transform(context->state, context->buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user