mirror of
https://github.com/vgough/encfs.git
synced 2025-01-30 01:28:37 +01:00
fix cipher initialization
git-svn-id: http://encfs.googlecode.com/svn/trunk@110 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
c44b208078
commit
1e6b715380
@ -358,8 +358,9 @@ CipherKey CipherV1::newKey(const char *password, int passwdLength,
|
||||
{
|
||||
LOG(ERROR) << "openssl error, PBKDF2 failed";
|
||||
return CipherKey();
|
||||
} else
|
||||
} else {
|
||||
*iterationCount = res;
|
||||
}
|
||||
} else
|
||||
{
|
||||
// known iteration length
|
||||
@ -574,7 +575,6 @@ int CipherV1::keySize() const
|
||||
|
||||
int CipherV1::cipherBlockSize() const
|
||||
{
|
||||
rAssert( _keySet );
|
||||
return _blockCipher->blockSize();
|
||||
}
|
||||
|
||||
|
@ -1170,7 +1170,8 @@ RootPtr createConfig( EncFS_Context *ctx,
|
||||
|
||||
void showFSInfo( const EncfsConfig &config )
|
||||
{
|
||||
shared_ptr<CipherV1> cipher = CipherV1::New( config.cipher(), -1 );
|
||||
shared_ptr<CipherV1> cipher = CipherV1::New( config.cipher(),
|
||||
config.key().size() );
|
||||
{
|
||||
cout << autosprintf(
|
||||
// xgroup(diag)
|
||||
@ -1204,11 +1205,6 @@ void showFSInfo( const EncfsConfig &config )
|
||||
cout << "\n";
|
||||
} else
|
||||
{
|
||||
// Set a null key - the cipher won't work, but it will at least know the
|
||||
// key size and blocksize.
|
||||
CipherKey tmpKey(config.key().size());
|
||||
cipher->setKey(tmpKey);
|
||||
|
||||
// check if we support the filename encoding interface..
|
||||
shared_ptr<NameIO> nameCoder = NameIO::New( config.naming(), cipher );
|
||||
if(!nameCoder)
|
||||
|
Loading…
Reference in New Issue
Block a user