MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / encryptFileToFile

Method encryptFileToFile

src/share/WizZiwReader.cpp:245–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244
245bool WizZiwReader::encryptFileToFile(const QString& sourceFileName, \
246 const QString& destFileName)
247{
248 QFile sourceFile(sourceFileName);
249 if (!sourceFile.open(QIODevice::ReadOnly)) {
250 TOLOG("Can't open source file while encrypt to temp file");
251 return false;
252 }
253
254 // encrypt data
255 QByteArray inBytes(sourceFile.readAll());
256 //
257 bool ret = encryptDataToFile(inBytes, destFileName);
258
259 sourceFile.close();
260
261 return ret;
262}
263
264//
265bool WizZiwReader::decryptFileToData(const QString& strEncryptedFileName, QByteArray& destData)

Callers 3

updateDocumentDataMethod · 0.80

Calls 3

TOLOGFunction · 0.85
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected