Commit 164307c6 authored by Белов Никита Сергеевич's avatar Белов Никита Сергеевич
Browse files

Update ak_belt_hash.c

parent c243f4d2
No related merge requests found
Showing with 3 additions and 2 deletions
+3 -2
......@@ -138,7 +138,9 @@ static int ak_hash_context_belt_finalize(ak_pointer sctx,
ak_uint64 lastBlock[8];
ak_uint64 final[6];
if ((size & 31) || !size)
ak_uint64* r = (ak_uint64*)cx->r;
if ((size & 31) || (r[0] == 0 && r[1] == 0))
{
memset(lastBlock, 0, 64); // Заполняем последний блок
memcpy(lastBlock, din, ssize);
......@@ -147,7 +149,6 @@ static int ak_hash_context_belt_finalize(ak_pointer sctx,
}
ak_uint64* r = (ak_uint64*)cx->r;
r[0] += size << 3;
if (r[0] == 0)
r[1] += 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment