mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-27 03:43:27 +01:00
Copy getRandomBytes from libaxolotl to libtextsecure
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user