Move attachment/websocket [en|de]cryption to libtextsecure
This commit is contained in:
parent
a9617068a2
commit
403ae4376d
7 changed files with 88 additions and 56 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue