aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2022-02-07 21:48:07 +0100
committerTobias Fella <fella@posteo.de>2022-02-07 21:48:07 +0100
commit7b5edb737522b03d4f697e0e09f1771ad5edef89 (patch)
treed102afda7ea49f7e51d4694e825d914a2ca8edef /lib/jobs
parent4837fd6de188b849a5d11de6791ba844398ce415 (diff)
downloadlibquotient-7b5edb737522b03d4f697e0e09f1771ad5edef89.tar.gz
libquotient-7b5edb737522b03d4f697e0e09f1771ad5edef89.zip
Remove encryptionmanager and various fixes
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/downloadfilejob.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/jobs/downloadfilejob.cpp b/lib/jobs/downloadfilejob.cpp
index 2eea9d59..c5280770 100644
--- a/lib/jobs/downloadfilejob.cpp
+++ b/lib/jobs/downloadfilejob.cpp
@@ -9,7 +9,6 @@
#ifdef Quotient_E2EE_ENABLED
# include <QtCore/QCryptographicHash>
-# include "encryptionmanager.h"
# include "events/encryptedfile.h"
#endif
@@ -126,7 +125,7 @@ BaseJob::Status DownloadFileJob::prepareResult()
QByteArray encrypted = d->tempFile->readAll();
EncryptedFile file = *d->encryptedFile;
- auto decrypted = EncryptionManager::decryptFile(encrypted, &file);
+ auto decrypted = file.decryptFile(encrypted);
d->targetFile->write(decrypted);
d->tempFile->remove();
} else {
@@ -151,7 +150,7 @@ BaseJob::Status DownloadFileJob::prepareResult()
auto encrypted = d->tempFile->readAll();
EncryptedFile file = *d->encryptedFile;
- auto decrypted = EncryptionManager::decryptFile(encrypted, &file);
+ auto decrypted = file.decryptFile(encrypted);
d->tempFile->write(decrypted);
} else {
#endif