Commit 6bc818e5 authored by ElenaSubbotina's avatar ElenaSubbotina

fix errors linux build

parent 1fb27ca9
...@@ -103,7 +103,9 @@ SOURCES += ../DocWrapper/DocxSerializer.cpp \ ...@@ -103,7 +103,9 @@ SOURCES += ../DocWrapper/DocxSerializer.cpp \
../../XlsxSerializerCom/Reader/CommonWriter.cpp \ ../../XlsxSerializerCom/Reader/CommonWriter.cpp \
../../XlsxSerializerCom/Reader/CSVReader.cpp \ ../../XlsxSerializerCom/Reader/CSVReader.cpp \
../../XlsxSerializerCom/Writer/CSVWriter.cpp \ ../../XlsxSerializerCom/Writer/CSVWriter.cpp \
../DocWrapper/ChartWriter.cpp ../DocWrapper/ChartWriter.cpp \
../../OfficeCryptReader/source/ECMACryptReader.cpp \
../../OfficeCryptReader/source/CryptTransform.cpp
HEADERS += ../DocWrapper/DocxSerializer.h \ HEADERS += ../DocWrapper/DocxSerializer.h \
../DocWrapper/FontProcessor.h \ ../DocWrapper/FontProcessor.h \
...@@ -137,7 +139,9 @@ HEADERS += ../DocWrapper/DocxSerializer.h \ ...@@ -137,7 +139,9 @@ HEADERS += ../DocWrapper/DocxSerializer.h \
../BinReader/webSettingsWriter.h \ ../BinReader/webSettingsWriter.h \
../../Common/FileDownloader/FileDownloader.h \ ../../Common/FileDownloader/FileDownloader.h \
../BinReader/DefaultThemeWriter.h \ ../BinReader/DefaultThemeWriter.h \
../DocWrapper/ChartWriter.h ../DocWrapper/ChartWriter.h \
../../OfficeCryptReader/source/ECMACryptReader.h \
../../OfficeCryptReader/source/CryptTransform.h
unix { unix {
target.path = /usr/lib target.path = /usr/lib
......
...@@ -197,7 +197,8 @@ _buf GenerateKey(_buf & salt, _buf & password, _buf & blockKey, int hashSize, in ...@@ -197,7 +197,8 @@ _buf GenerateKey(_buf & salt, _buf & password, _buf & blockKey, int hashSize, in
for (int i = 0; i < spin; i++) for (int i = 0; i < spin; i++)
{ {
pHashBuf = HashAppend(_buf((unsigned char*)&i, 4, false), pHashBuf, algorithm); _buf iterator((unsigned char*)&i, 4, false);
pHashBuf = HashAppend(iterator, pHashBuf, algorithm);
} }
pHashBuf = HashAppend(pHashBuf, blockKey, algorithm); pHashBuf = HashAppend(pHashBuf, blockKey, algorithm);
...@@ -243,7 +244,8 @@ bool ECMADecryptor::SetPassword(std::wstring password_) ...@@ -243,7 +244,8 @@ bool ECMADecryptor::SetPassword(std::wstring password_)
DecryptAES(verifierInputKey, pSalt, pEncVerInput, decryptedVerifierHashInputBytes); DecryptAES(verifierInputKey, pSalt, pEncVerInput, decryptedVerifierHashInputBytes);
//-------------------------------------------- //--------------------------------------------
_buf hashBuf = HashAppend(decryptedVerifierHashInputBytes, _buf(), cryptData.hashAlgorithm); _buf empty(NULL,0,false);
_buf hashBuf = HashAppend(decryptedVerifierHashInputBytes, empty, cryptData.hashAlgorithm);
//-------------------------------------------- //--------------------------------------------
_buf decryptedVerifierHashBytes; _buf decryptedVerifierHashBytes;
......
...@@ -241,7 +241,7 @@ bool ECMACryptReader::DecryptOfficeFile(std::wstring file_name_inp, std::wstring ...@@ -241,7 +241,7 @@ bool ECMACryptReader::DecryptOfficeFile(std::wstring file_name_inp, std::wstring
if (data_out) if (data_out)
{ {
NSFile::CFileBinary f; NSFile::CFileBinary f;
f.CreateFile(file_name_out); f.CreateFileW(file_name_out);
f.WriteFile(data_out, lengthData); f.WriteFile(data_out, lengthData);
f.CloseFile(); f.CloseFile();
......
...@@ -253,6 +253,7 @@ linux-g++ | linux-g++-64 | linux-g++-32 { ...@@ -253,6 +253,7 @@ linux-g++ | linux-g++-64 | linux-g++-32 {
LIBS += -lz LIBS += -lz
LIBS += -lxml2 LIBS += -lxml2
LIBS += -lcurl LIBS += -lcurl
LIBS += -lcrypto++
} }
mac { mac {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment