mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux/MacOSX : fix encryption/decryption issues with hard drives that have a sector size bigger than 512. Now, we use the sector size as the minimum unit for data fragment encryption/decryption.
This commit is contained in:
@@ -108,7 +108,7 @@ namespace VeraCrypt
|
|||||||
workItem->Encryption.StartUnitNo = fragmentStartUnitNo;
|
workItem->Encryption.StartUnitNo = fragmentStartUnitNo;
|
||||||
workItem->Encryption.SectorSize = sectorSize;
|
workItem->Encryption.SectorSize = sectorSize;
|
||||||
|
|
||||||
fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE;
|
fragmentData += unitsPerFragment * sectorSize;
|
||||||
fragmentStartUnitNo += unitsPerFragment;
|
fragmentStartUnitNo += unitsPerFragment;
|
||||||
|
|
||||||
if (remainder > 0 && --remainder == 0)
|
if (remainder > 0 && --remainder == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user