Move attachment/websocket [en|de]cryption to libtextsecure

This commit is contained in:
Matt Corallo 2015-01-15 18:11:08 -10:00 committed by lilia
parent a9617068a2
commit 403ae4376d
7 changed files with 88 additions and 56 deletions

View file

@ -234,7 +234,7 @@ window.textsecure.messaging = function() {
proto.key = axolotl.crypto.getRandomBytes(64);
var iv = axolotl.crypto.getRandomBytes(16);
return textsecure.protocol.encryptAttachment(attachment.data, proto.key, iv).then(function(encryptedBin) {
return textsecure.crypto.encryptAttachment(attachment.data, proto.key, iv).then(function(encryptedBin) {
return textsecure.api.putAttachment(encryptedBin).then(function(id) {
proto.id = id;
proto.contentType = attachment.contentType;