mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 11:28:26 -06:00
Windows: Remove support for 32-bit driver code. Set build target as Windows 10. Simplify code and fix all warnings in driver.
This commit is contained in:
@@ -957,28 +957,35 @@ void WHIRLPOOL_add(const unsigned char * input,
|
||||
}
|
||||
|
||||
// now process the input data in blocks of 64 bytes and save the leftovers to ctx->data
|
||||
if (len >= 64)
|
||||
{
|
||||
if (input == data)
|
||||
{
|
||||
HashMultipleBlocks(ctx, dataBuf, 64);
|
||||
return;
|
||||
}
|
||||
else if (IsAligned16(input))
|
||||
{
|
||||
uint64 leftOver = HashMultipleBlocks(ctx, (uint64 *)input, len);
|
||||
input += (len - leftOver);
|
||||
len = leftOver;
|
||||
}
|
||||
else
|
||||
do
|
||||
{ // copy input first if it's not aligned correctly
|
||||
memcpy(data, input, 64);
|
||||
HashMultipleBlocks(ctx, dataBuf, 64);
|
||||
input+=64;
|
||||
len-=64;
|
||||
} while (len >= 64);
|
||||
}
|
||||
if (len >= 64)
|
||||
{
|
||||
if (input == data)
|
||||
{
|
||||
HashMultipleBlocks(ctx, dataBuf, 64);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
||||
if (IsAligned16(input))
|
||||
#endif
|
||||
{
|
||||
uint64 leftOver = HashMultipleBlocks(ctx, (uint64*)input, len);
|
||||
input += (len - leftOver);
|
||||
len = leftOver;
|
||||
}
|
||||
#ifndef CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
|
||||
else
|
||||
do
|
||||
{ // copy input first if it's not aligned correctly
|
||||
memcpy(data, input, 64);
|
||||
HashMultipleBlocks(ctx, dataBuf, 64);
|
||||
input += 64;
|
||||
len -= 64;
|
||||
} while (len >= 64);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (len && data != input)
|
||||
memcpy(data, input, (size_t) len);
|
||||
|
||||
Reference in New Issue
Block a user