mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: use the selected hash algorithm when resuming interrupted process. This reduces volume opening time.
This commit is contained in:
@@ -224,7 +224,6 @@ Password volumePassword; /* User password */
|
|||||||
char szVerify[MAX_PASSWORD + 1]; /* Tmp password buffer */
|
char szVerify[MAX_PASSWORD + 1]; /* Tmp password buffer */
|
||||||
char szRawPassword[MAX_PASSWORD + 1]; /* Password before keyfile was applied to it */
|
char szRawPassword[MAX_PASSWORD + 1]; /* Password before keyfile was applied to it */
|
||||||
|
|
||||||
int volumePkcs5Prf = 0;
|
|
||||||
|
|
||||||
BOOL bHistoryCmdLine = FALSE; /* History control is always disabled */
|
BOOL bHistoryCmdLine = FALSE; /* History control is always disabled */
|
||||||
BOOL ComServerMode = FALSE;
|
BOOL ComServerMode = FALSE;
|
||||||
@@ -6901,7 +6900,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||||||
{
|
{
|
||||||
OpenVolumeContext volume;
|
OpenVolumeContext volume;
|
||||||
|
|
||||||
if (OpenVolume (&volume, device.Path.c_str(), &volumePassword, volumePkcs5Prf, FALSE, FALSE, TRUE) == ERR_SUCCESS)
|
if (OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, FALSE, FALSE, TRUE) == ERR_SUCCESS)
|
||||||
{
|
{
|
||||||
if ((volume.CryptoInfo->HeaderFlags & TC_HEADER_FLAG_NONSYS_INPLACE_ENC) != 0
|
if ((volume.CryptoInfo->HeaderFlags & TC_HEADER_FLAG_NONSYS_INPLACE_ENC) != 0
|
||||||
&& volume.CryptoInfo->EncryptedAreaLength.Value != volume.CryptoInfo->VolumeSize.Value)
|
&& volume.CryptoInfo->EncryptedAreaLength.Value != volume.CryptoInfo->VolumeSize.Value)
|
||||||
|
|||||||
Reference in New Issue
Block a user