Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
22f98629
Commit
22f98629
authored
Oct 12, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
86d2bde8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
OfficeCryptReader/Test/Test.cpp
OfficeCryptReader/Test/Test.cpp
+10
-7
OfficeCryptReader/Test/Test.vcproj
OfficeCryptReader/Test/Test.vcproj
+1
-0
No files found.
OfficeCryptReader/Test/Test.cpp
View file @
22f98629
...
...
@@ -5,19 +5,22 @@
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[])
{
std
::
wstring
srcFileName
=
L"D:
\\
test
\\
_crypted
\\
test-password-2016.docx"
;
std
::
wstring
dstFileName
=
srcFileName
+
L".oox"
;
std
::
wstring
dstFileName2
=
dstFileName
+
L"-mycrypt.docx"
;
//std::wstring srcFileName = L"D:\\test\\_crypted\\test-password-2016.docx";
//std::wstring dstFileName = srcFileName + L".oox";
//std::wstring dstFileName2 = dstFileName + L"-mycrypt.docx";
std
::
wstring
srcFileName
=
L"D:
\\
test
\\
_crypted
\\
test.docx"
;
std
::
wstring
dstFileName2
=
srcFileName
+
L"-mycrypt.docx"
;
std
::
wstring
password
=
L"password"
;
std
::
wstring
password
=
L"password
132eqdqdwewedwdwwskskms09elzwewedskjsdnkjsdnjksjsnkcsdncskjdnss
"
;
ECMACryptFile
crypt_file
;
bool
result
,
bDataIntegrity
;
result
=
crypt_file
.
DecryptOfficeFile
(
srcFileName
,
dstFileName
,
password
,
bDataIntegrity
);
result
=
crypt_file
.
EncryptOfficeFile
(
dstFileName
,
dstFileName2
,
password
);
//result = crypt_file.DecryptOfficeFile(srcFileName, dstFileName, password, bDataIntegrity);
//result = crypt_file.EncryptOfficeFile(dstFileName, dstFileName2, password);
result
=
crypt_file
.
EncryptOfficeFile
(
srcFileName
,
dstFileName2
,
password
);
return
0
;
}
OfficeCryptReader/Test/Test.vcproj
View file @
22f98629
...
...
@@ -40,6 +40,7 @@
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE"
MinimalRebuild=
"true"
BasicRuntimeChecks=
"3"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment