diff options
Diffstat (limited to 'src/Common/Pkcs5.c')
-rw-r--r-- | src/Common/Pkcs5.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Common/Pkcs5.c b/src/Common/Pkcs5.c index 8f0c3645..e522a360 100644 --- a/src/Common/Pkcs5.c +++ b/src/Common/Pkcs5.c @@ -665,19 +665,22 @@ char *get_pkcs5_prf_name (int pkcs5_prf_id) -int get_pkcs5_iteration_count (int pkcs5_prf_id, BOOL bBoot)
+int get_pkcs5_iteration_count (int pkcs5_prf_id, BOOL truecryptMode, BOOL bBoot)
{
switch (pkcs5_prf_id)
{
case RIPEMD160:
- return bBoot? 327661 : 655331;
+ if (truecryptMode)
+ return bBoot ? 1000 : 2000;
+ else
+ return bBoot? 327661 : 655331;
case SHA512:
- return 500000;
+ return truecryptMode? 1000 : 500000;
case WHIRLPOOL:
- return 500000;
+ return truecryptMode? 1000 : 500000;
case SHA256:
return bBoot? 200000 : 500000;
|