Sync test fixes

This commit is contained in:
SChernykh
2023-11-17 19:50:55 +01:00
parent 5aff5f5796
commit 394b4f310e
3 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ static void sha256_transform(SHA256_CTX *ctx, const uint8_t* data)
uint32_t a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];
for (i = 0, j = 0; i < 16; ++i, j += 4)
m[i] = (data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]);
m[i] = (((uint32_t)data[j]) << 24) | (((uint32_t)data[j + 1]) << 16) | (((uint32_t)data[j + 2]) << 8) | ((uint32_t)data[j + 3]);
for ( ; i < 64; ++i)
m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16];