Naively move textsecure.crypto into axolotl.crypto

This commit is contained in:
Matt Corallo 2015-01-14 13:55:30 -10:00 committed by lilia
parent 849fdb7ae4
commit 66cf5b08db
13 changed files with 16433 additions and 65 deletions

View file

@ -231,9 +231,9 @@ window.textsecure.messaging = function() {
makeAttachmentPointer = function(attachment) {
var proto = new textsecure.protobuf.PushMessageContent.AttachmentPointer();
proto.key = textsecure.crypto.getRandomBytes(64);
proto.key = axolotl.crypto.getRandomBytes(64);
var iv = textsecure.crypto.getRandomBytes(16);
var iv = axolotl.crypto.getRandomBytes(16);
return textsecure.protocol.encryptAttachment(attachment.data, proto.key, iv).then(function(encryptedBin) {
return textsecure.api.putAttachment(encryptedBin).then(function(id) {
proto.id = id;