Skip to content

Commit

Permalink
fix to match other implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackedPixel committed Oct 16, 2024
1 parent 872795c commit 31d6c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -2770,7 +2770,7 @@ unsigned int *ComputeSHA1(unsigned char *data, int dataSize) {
msg[dataSize] = 128; // Write the '1' bit

unsigned int bitsLen = 8*dataSize;
memcpy(msg + newDataSize, &bitsLen, 4); // Append the len in bits at the end of the buffer
msg[newDataSize-1] = bitsLen;

// Process the message in successive 512-bit chunks
for (int offset = 0; offset < newDataSize; offset += (512/8))
Expand Down

0 comments on commit 31d6c19

Please sign in to comment.