Signaling key is now an array buffer

This commit is contained in:
lilia 2015-05-13 13:59:16 -07:00
parent 3f37cd21a9
commit 704c6ce779
2 changed files with 4 additions and 4 deletions

View file

@ -37909,8 +37909,8 @@ axolotlInternal.RecipientRecord = function() {
// Decrypts message into a raw string
decryptWebsocketMessage: function(message) {
var signaling_key = textsecure.storage.get("signaling_key"); //TODO: in crypto_storage
var aes_key = toArrayBuffer(signaling_key.substring(0, 32));
var mac_key = toArrayBuffer(signaling_key.substring(32, 32 + 20));
var aes_key = signaling_key.slice(0, 32);
var mac_key = signaling_key.slice(32, 32 + 20);
var decodedMessage = message.toArrayBuffer();
if (new Uint8Array(decodedMessage)[0] != 1)

View file

@ -49,8 +49,8 @@
// Decrypts message into a raw string
decryptWebsocketMessage: function(message) {
var signaling_key = textsecure.storage.get("signaling_key"); //TODO: in crypto_storage
var aes_key = toArrayBuffer(signaling_key.substring(0, 32));
var mac_key = toArrayBuffer(signaling_key.substring(32, 32 + 20));
var aes_key = signaling_key.slice(0, 32);
var mac_key = signaling_key.slice(32, 32 + 20);
var decodedMessage = message.toArrayBuffer();
if (new Uint8Array(decodedMessage)[0] != 1)