mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Update libaxolotl, remove one string conversion
Previously we would convert a bytebuffer to a string, pass it to libaxolotl where it would be parsed back into a bytebuffer. Ideally we would just pass the bytebuffer, but it turns out that libaxolotl's bytebyffer class is identical but separate from libtextsecure's bytebuffer class. ¯\_(ツ)_/¯ So instead we pass the underlying array buffer, which is handled more or less the same way as a bytebuffer, and most importantly, does not involve any copying. // FREEBIE
This commit is contained in:
@@ -37365,7 +37365,7 @@ window.axolotl.protocol = function(storage_interface) {
|
||||
|
||||
// Inits a session (maybe) and then decrypts the message
|
||||
self.handlePreKeyWhisperMessage = function(from, encodedMessage) {
|
||||
var preKeyProto = axolotlInternal.protobuf.PreKeyWhisperMessage.decode(encodedMessage, 'binary');
|
||||
var preKeyProto = axolotlInternal.protobuf.PreKeyWhisperMessage.decode(encodedMessage);
|
||||
return initSessionFromPreKeyWhisperMessage(from, preKeyProto).then(function(sessions) {
|
||||
return doDecryptWhisperMessage(from, axolotlInternal.utils.convertToString(preKeyProto.message), sessions[0], preKeyProto.registrationId).then(function(result) {
|
||||
if (sessions[1] !== undefined)
|
||||
|
||||
Reference in New Issue
Block a user