mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
22 lines
572 B
C++
22 lines
572 B
C++
// Test.cpp : Defines the entry point for the console application.
|
|
//
|
|
#include "tchar.h"
|
|
#include "../source/ECMACryptFile.h"
|
|
|
|
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 password = L"password";
|
|
|
|
ECMACryptFile crypt_file;
|
|
crypt_file.DecryptOfficeFile(srcFileName, dstFileName, password);
|
|
|
|
crypt_file.EncryptOfficeFile(dstFileName, dstFileName2, password);
|
|
|
|
return 0;
|
|
}
|
|
|