diff --git a/js/libtextsecure.js b/js/libtextsecure.js index e1b1588b..860ba1d5 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -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) diff --git a/libtextsecure/crypto.js b/libtextsecure/crypto.js index 93a42df7..65e08252 100644 --- a/libtextsecure/crypto.js +++ b/libtextsecure/crypto.js @@ -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)