Naprawiono problem z nie grenerowaniem klucza szyfrującego
This commit is contained in:
parent
29b2460910
commit
fd42a5812a
8 changed files with 23 additions and 17 deletions
|
|
@ -25,6 +25,7 @@ CreateCargo::CreateCargo()
|
|||
, version(VERSION)
|
||||
, methodFlags(0)
|
||||
, offset(0)
|
||||
, hppKey(false)
|
||||
{
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
|
@ -87,9 +88,9 @@ bool CreateCargo::Create(const std::string& path, const int16_t& flag)
|
|||
}
|
||||
|
||||
// Zapisywanie klucza szyfruj¹cego
|
||||
if (flag == 2 || flag == 3)
|
||||
if (flag == 2 || flag == 3 || encList.size() > 0)
|
||||
{
|
||||
crypt.saveKey(catalogPath);
|
||||
crypt.saveKey(catalogPath, hppKey);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -194,15 +195,15 @@ void CreateCargo::computingBytes(const int16_t& flag, std::vector<char>& input,
|
|||
switch (flag)
|
||||
{
|
||||
case 1:
|
||||
output = cm.chunked(input, false);
|
||||
output = cm.chunked(input, true, false);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
output = crypt.encrypt(input);
|
||||
output = cm.chunked(input, false, true);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
output = crypt.encrypt(cm.chunked(input, false));
|
||||
output = cm.chunked(input, true, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -287,6 +288,8 @@ void CreateCargo::GetFilters(const std::string& filterFile)
|
|||
|
||||
// Lista plików do pominiêcia
|
||||
ignoreList = jslist[KEY_IGNORE].get<std::vector<std::string>>();
|
||||
|
||||
hppKey = jslist["keyhpp"];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue