Skip to content

Commit

Permalink
added missing part
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackedPixel committed Oct 16, 2024
1 parent 1d566eb commit 0199d2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,11 @@ unsigned int *ComputeSHA1(unsigned char *data, int dataSize) {
// Break chunk into sixteen 32-bit words w[j], 0 <= j <= 15
unsigned int *w = (unsigned int *)(msg + offset);

// Message schedule: extend the sixteen 32-bit words into eighty 32-bit words:
for (int i = 16; i < 80; ++i) {
w[i] = ROTATE_LEFT(w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16], 1);
}

// Initialize hash value for this chunk
unsigned int a = hash[0];
unsigned int b = hash[1];
Expand Down

0 comments on commit 0199d2e

Please sign in to comment.