mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Suppress last compiler warnings in sha1.cpp
* Immediate '0x80' is unsigned. * Assign only the first 32bits to int block.
This commit is contained in:
parent
f21202611c
commit
7f16717d5d
@ -68,7 +68,7 @@ std::string SHA1::final()
|
|||||||
uint64 total_bits = (transforms*BLOCK_BYTES + buffer.size()) * 8;
|
uint64 total_bits = (transforms*BLOCK_BYTES + buffer.size()) * 8;
|
||||||
|
|
||||||
/* Padding */
|
/* Padding */
|
||||||
buffer += 0x80;
|
buffer += (unsigned char)0x80;
|
||||||
size_t orig_size = buffer.size();
|
size_t orig_size = buffer.size();
|
||||||
while (buffer.size() < BLOCK_BYTES)
|
while (buffer.size() < BLOCK_BYTES)
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ std::string SHA1::final()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Append total_bits, split this uint64 into two uint32 */
|
/* Append total_bits, split this uint64 into two uint32 */
|
||||||
block[BLOCK_INTS - 1] = total_bits;
|
block[BLOCK_INTS - 1] = total_bits & UINT_MAX;
|
||||||
block[BLOCK_INTS - 2] = (total_bits >> 32);
|
block[BLOCK_INTS - 2] = (total_bits >> 32);
|
||||||
transform(block);
|
transform(block);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user