From cb6dad6bd21d66cd28b3ef47e3540316ee9913c3 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 27 Jul 2014 03:29:45 +0200 Subject: Linux/MacOSX port of manual selection of number of passes for volume header over-write operation. --- src/Core/CoreBase.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Core/CoreBase.cpp') diff --git a/src/Core/CoreBase.cpp b/src/Core/CoreBase.cpp index 038640ca..95e5c206 100644 --- a/src/Core/CoreBase.cpp +++ b/src/Core/CoreBase.cpp @@ -23,7 +23,7 @@ namespace VeraCrypt { } - void CoreBase::ChangePassword (shared_ptr openVolume, shared_ptr newPassword, shared_ptr newKeyfiles, shared_ptr newPkcs5Kdf) const + void CoreBase::ChangePassword (shared_ptr openVolume, shared_ptr newPassword, shared_ptr newKeyfiles, shared_ptr newPkcs5Kdf, int wipeCount) const { if ((!newPassword || newPassword->Size() < 1) && (!newKeyfiles || newKeyfiles->empty())) throw PasswordEmpty (SRC_POS); @@ -48,9 +48,9 @@ namespace VeraCrypt bool backupHeader = false; while (true) { - for (int i = 1; i <= SecureWipePassCount; i++) + for (int i = 1; i <= wipeCount; i++) { - if (i == SecureWipePassCount) + if (i == wipeCount) RandomNumberGenerator::GetData (newSalt); else RandomNumberGenerator::GetDataFast (newSalt); @@ -68,10 +68,10 @@ namespace VeraCrypt } } - void CoreBase::ChangePassword (shared_ptr volumePath, bool preserveTimestamps, shared_ptr password, shared_ptr keyfiles, shared_ptr newPassword, shared_ptr newKeyfiles, shared_ptr newPkcs5Kdf) const + void CoreBase::ChangePassword (shared_ptr volumePath, bool preserveTimestamps, shared_ptr password, shared_ptr keyfiles, shared_ptr newPassword, shared_ptr newKeyfiles, shared_ptr newPkcs5Kdf, int wipeCount) const { shared_ptr volume = OpenVolume (volumePath, preserveTimestamps, password, keyfiles); - ChangePassword (volume, newPassword, newKeyfiles, newPkcs5Kdf); + ChangePassword (volume, newPassword, newKeyfiles, newPkcs5Kdf, wipeCount); } void CoreBase::CoalesceSlotNumberAndMountPoint (MountOptions &options) const -- cgit v1.2.3