aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/file_provider.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2018-11-27 14:57:52 +0100
committerfiaxh <git@lightrise.org>2018-11-27 15:02:18 +0100
commit141db9e40a3a81cfa3ad3587dc47f69c541d0fde (patch)
treeaf02d0049c24abcdbf7b15f1c1037114319c7d73 /plugins/omemo/src/file_provider.vala
parent01360a73ae8a148ca19c75e3b11167965b887d8b (diff)
downloaddino-141db9e40a3a81cfa3ad3587dc47f69c541d0fde.tar.gz
dino-141db9e40a3a81cfa3ad3587dc47f69c541d0fde.zip
Implement aesgcm encrypted file upload
Diffstat (limited to 'plugins/omemo/src/file_provider.vala')
-rw-r--r--plugins/omemo/src/file_provider.vala5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/omemo/src/file_provider.vala b/plugins/omemo/src/file_provider.vala
index fb1c1d1e..810da084 100644
--- a/plugins/omemo/src/file_provider.vala
+++ b/plugins/omemo/src/file_provider.vala
@@ -14,8 +14,6 @@ public class FileProvider : Dino.FileProvider, Object {
private Dino.Database dino_db;
private Regex url_regex;
- private Gee.List<string> ignore_once = new ArrayList<string>();
-
public FileProvider(StreamInteractor stream_interactor, Dino.Database dino_db) {
this.stream_interactor = stream_interactor;
this.dino_db = dino_db;
@@ -139,7 +137,8 @@ public class FileProvider : Dino.FileProvider, Object {
} while(len > 0);
// Decrypt
- return new MemoryInputStream.from_data(aes_decrypt(Cipher.AES_GCM_NOPADDING, key, iv, data.data));
+ uint8[] cleartext = Signal.aes_decrypt(Cipher.AES_GCM_NOPADDING, key, iv, data.data);
+ return new MemoryInputStream.from_data(cleartext);
}
private uint8[] hex_to_bin(string hex) {