VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
authorDavid Foerster <david.foerster@informatik.hu-berlin.de>2016-05-10 22:16:32 +0200
committerDavid Foerster <david.foerster@informatik.hu-berlin.de>2016-05-10 22:18:34 +0200
commit11716ed2dacbb104f8f59867fe66f2c0a6984291 (patch)
tree28aa448de2e790d0f40dc57799a55a9df12ee6fb /src/Common/Password.c
parent191075155835172e5596e191cf0679ff9022f0fd (diff)
downloadVeraCrypt-11716ed2dacbb104f8f59867fe66f2c0a6984291.tar.gz
VeraCrypt-11716ed2dacbb104f8f59867fe66f2c0a6984291.zip
Remove trailing whitespace
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 4d7c7952..2c9e77c3 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -1,11 +1,11 @@
/*
Legal Notice: Some portions of the source code contained in this file were
- derived from the source code of TrueCrypt 7.1a, which is
- Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
+ derived from the source code of TrueCrypt 7.1a, which is
+ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
governed by the TrueCrypt License 3.0, also from the source code of
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
- and which is governed by the 'License Agreement for Encryption for the Masses'
- Modifications and additions to the original source code (contained in this file)
+ and which is governed by the 'License Agreement for Encryption for the Masses'
+ Modifications and additions to the original source code (contained in this file)
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
@@ -89,7 +89,7 @@ void VerifyPasswordAndUpdate (HWND hwndDlg, HWND hButton, HWND hPassword,
BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw)
{
int i, len;
-
+
if (hPassword == NULL)
{
if (ptrPw)
@@ -113,7 +113,7 @@ BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw)
len = GetWindowTextLength (hPassword);
if (len > MAX_PASSWORD)
- return FALSE;
+ return FALSE;
GetWindowTextW (hPassword, s, sizeof (s) / sizeof (wchar_t));
@@ -126,7 +126,7 @@ BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw)
burn (s, sizeof(s));
if (i < len)
- return FALSE;
+ return FALSE;
}
return TRUE;
@@ -141,7 +141,7 @@ BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pim
if (bCustomPimSmall)
{
Error (bForBoot? "BOOT_PIM_REQUIRE_LONG_PASSWORD": "PIM_REQUIRE_LONG_PASSWORD", hwndDlg);
- return FALSE;
+ return FALSE;
}
#ifndef _DEBUG
@@ -215,14 +215,14 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
else
{
nDosLinkCreated = FakeDosNameForDevice (szDiskFile, szDosDevice, sizeof(szDosDevice), szCFDevice, sizeof(szCFDevice),FALSE);
-
+
if (nDosLinkCreated != 0)
goto error;
}
dev = CreateFile (szCFDevice, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
- if (dev == INVALID_HANDLE_VALUE)
+ if (dev == INVALID_HANDLE_VALUE)
goto error;
if (bDevice)
@@ -328,7 +328,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
if (bytesRead != sizeof (buffer))
{
- // Windows may report EOF when reading sectors from the last cluster of a device formatted as NTFS
+ // Windows may report EOF when reading sectors from the last cluster of a device formatted as NTFS
memset (buffer, 0, sizeof (buffer));
}
@@ -347,7 +347,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
cryptoInfo = NULL;
goto error;
}
- else
+ else
break;
}
@@ -374,12 +374,12 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
EnableElevatedCursorChange (hwndDlg);
WaitCursor();
- /* Re-encrypt the volume header */
+ /* Re-encrypt the volume header */
backupHeader = FALSE;
while (TRUE)
{
- /* The header will be re-encrypted wipePassCount times to prevent adversaries from using
+ /* The header will be re-encrypted wipePassCount times to prevent adversaries from using
techniques such as magnetic force microscopy or magnetic force scanning tunnelling microscopy
to recover the overwritten header. According to Peter Gutmann, data should be overwritten 22
times (ideally, 35 times) using non-random patterns and pseudorandom data. However, as users might
@@ -447,7 +447,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
if (backupHeader || cryptoInfo->LegacyVolume)
break;
-
+
backupHeader = TRUE;
headerOffset.QuadPart += hostSize - TC_VOLUME_HEADER_GROUP_SIZE;
}