Copy getRandomBytes from libaxolotl to libtextsecure
This commit is contained in:
parent
12844590f5
commit
7d2d2d92fc
4 changed files with 14 additions and 11 deletions
|
@ -232,9 +232,9 @@ window.textsecure.messaging = function() {
|
|||
|
||||
makeAttachmentPointer = function(attachment) {
|
||||
var proto = new textsecure.protobuf.PushMessageContent.AttachmentPointer();
|
||||
proto.key = axolotl.crypto.getRandomBytes(64);
|
||||
proto.key = textsecure.crypto.getRandomBytes(64);
|
||||
|
||||
var iv = axolotl.crypto.getRandomBytes(16);
|
||||
var iv = textsecure.crypto.getRandomBytes(16);
|
||||
return textsecure.crypto.encryptAttachment(attachment.data, proto.key, iv).then(function(encryptedBin) {
|
||||
return textsecure.api.putAttachment(encryptedBin).then(function(id) {
|
||||
proto.id = id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue