VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Pkcs5.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-11 01:48:52 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-11 01:58:34 +0200
commit6ef41abdd2122c36d9387cc4bbdbcfc81315b94b (patch)
treecb86ea0e7857825ba985c7d81a5a6b5a53c1655f /src/Common/Pkcs5.c
parent7a01453f00aba9ed41228ac9c7064e69379be8cd (diff)
downloadVeraCrypt-6ef41abdd2122c36d9387cc4bbdbcfc81315b94b.tar.gz
VeraCrypt-6ef41abdd2122c36d9387cc4bbdbcfc81315b94b.zip
Use Pim name for internal variables instead of the old name Pin
Diffstat (limited to 'src/Common/Pkcs5.c')
-rw-r--r--src/Common/Pkcs5.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Common/Pkcs5.c b/src/Common/Pkcs5.c
index 3e03ade2..ea0a9874 100644
--- a/src/Common/Pkcs5.c
+++ b/src/Common/Pkcs5.c
@@ -129,7 +129,7 @@ static void derive_u_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, u
#ifdef TC_WINDOWS_BOOT
/* In bootloader mode, least significant bit of iterations is a boolean (TRUE for boot derivation mode, FALSE otherwise)
- * and the most significant 16 bits hold the pin value
+ * and the most significant 16 bits hold the pim value
* This enables us to save code space needed for implementing other features.
*/
c = iterations >> 16;
@@ -483,7 +483,7 @@ static void derive_u_ripemd160 (char *pwd, int pwd_len, char *salt, int salt_len
#ifdef TC_WINDOWS_BOOT
/* In bootloader mode, least significant bit of iterations is a boolean (TRUE for boot derivation mode, FALSE otherwise)
- * and the most significant 16 bits hold the pin value
+ * and the most significant 16 bits hold the pim value
* This enables us to save code space needed for implementing other features.
*/
c = iterations >> 16;
@@ -757,10 +757,10 @@ char *get_pkcs5_prf_name (int pkcs5_prf_id)
-int get_pkcs5_iteration_count (int pkcs5_prf_id, int pin, BOOL truecryptMode, BOOL bBoot)
+int get_pkcs5_iteration_count (int pkcs5_prf_id, int pim, BOOL truecryptMode, BOOL bBoot)
{
- if ( (pin < 0)
- || (truecryptMode && pin > 0) /* No PIM for TrueCrypt mode */
+ if ( (pim < 0)
+ || (truecryptMode && pim > 0) /* No PIM for TrueCrypt mode */
)
{
return 0;
@@ -772,27 +772,27 @@ int get_pkcs5_iteration_count (int pkcs5_prf_id, int pin, BOOL truecryptMode, BO
case RIPEMD160:
if (truecryptMode)
return bBoot ? 1000 : 2000;
- else if (pin == 0)
+ else if (pim == 0)
return bBoot? 327661 : 655331;
else
{
- return bBoot? pin * 2048 : 15000 + pin * 1000;
+ return bBoot? pim * 2048 : 15000 + pim * 1000;
}
case SHA512:
- return truecryptMode? 1000 : ((pin == 0)? 500000 : 15000 + pin * 1000);
+ return truecryptMode? 1000 : ((pim == 0)? 500000 : 15000 + pim * 1000);
case WHIRLPOOL:
- return truecryptMode? 1000 : ((pin == 0)? 500000 : 15000 + pin * 1000);
+ return truecryptMode? 1000 : ((pim == 0)? 500000 : 15000 + pim * 1000);
case SHA256:
if (truecryptMode)
return 0; // SHA-256 not supported by TrueCrypt
- else if (pin == 0)
+ else if (pim == 0)
return bBoot? 200000 : 500000;
else
{
- return bBoot? pin * 2048 : 15000 + pin * 1000;
+ return bBoot? pim * 2048 : 15000 + pim * 1000;
}
default: