mirror of
https://github.com/vgough/encfs.git
synced 2025-01-01 03:28:57 +01:00
add KDF duration prompt in expert config mode, fixes #168
git-svn-id: http://encfs.googlecode.com/svn/trunk@105 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
f4cd48aea1
commit
fe2cb136a4
@ -668,6 +668,18 @@ Interface selectNameCoding(const CipherV1::CipherAlgorithm &alg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int selectKDFDuration() {
|
||||||
|
cout << autosprintf(_("Select desired KDF duration in milliseconds.\n"
|
||||||
|
"The default is 500 (half a second): "));
|
||||||
|
|
||||||
|
char answer[10];
|
||||||
|
char *res = fgets( answer, sizeof(answer), stdin );
|
||||||
|
int duration = (res == 0 ? 0 : atoi( answer ));
|
||||||
|
cout << "\n";
|
||||||
|
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int selectKeySize( const CipherV1::CipherAlgorithm &alg )
|
int selectKeySize( const CipherV1::CipherAlgorithm &alg )
|
||||||
{
|
{
|
||||||
@ -1028,6 +1040,7 @@ RootPtr createConfig( EncFS_Context *ctx,
|
|||||||
selectBlockMAC(&blockMACBytes, &blockMACRandBytes);
|
selectBlockMAC(&blockMACBytes, &blockMACRandBytes);
|
||||||
allowHoles = selectZeroBlockPassThrough();
|
allowHoles = selectZeroBlockPassThrough();
|
||||||
}
|
}
|
||||||
|
desiredKDFDuration = selectKDFDuration();
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_ptr<CipherV1> cipher = CipherV1::New( alg.iface, keySize );
|
shared_ptr<CipherV1> cipher = CipherV1::New( alg.iface, keySize );
|
||||||
|
Loading…
Reference in New Issue
Block a user