diff options
author | pedroGitt <pedro.contreiras@amdocs.com> | 2016-11-23 00:04:58 +0100 |
---|---|---|
committer | pedroGitt <pedro.contreiras@amdocs.com> | 2016-11-23 00:04:58 +0100 |
commit | 7a6897642baa8fc5d9d9f14c80fc4f201cfe2173 (patch) | |
tree | 9325a7d7d3ac40747f49af22378dcf9bc5c0dd0b /javascript/olm_inbound_group_session.js | |
parent | c725a561a283f508e68516ded86d141214f5ea06 (diff) | |
parent | f6c05be8c5d35e725a8a2ed5ad661398ac9f8cd2 (diff) |
Merge remote-tracking branch 'origin/master' into pedroc/android_e2e_dev
Diffstat (limited to 'javascript/olm_inbound_group_session.js')
-rw-r--r-- | javascript/olm_inbound_group_session.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/javascript/olm_inbound_group_session.js b/javascript/olm_inbound_group_session.js index 6058233..1b7fcfe 100644 --- a/javascript/olm_inbound_group_session.js +++ b/javascript/olm_inbound_group_session.js @@ -73,10 +73,12 @@ InboundGroupSession.prototype['decrypt'] = restore_stack(function( // So we copy the array to a new buffer var message_buffer = stack(message_array); var plaintext_buffer = stack(max_plaintext_length + NULL_BYTE_PADDING_LENGTH); + var message_index = stack(4); var plaintext_length = inbound_group_session_method(Module["_olm_group_decrypt"])( this.ptr, message_buffer, message_array.length, - plaintext_buffer, max_plaintext_length + plaintext_buffer, max_plaintext_length, + message_index ); // Pointer_stringify requires a null-terminated argument (the optional @@ -86,7 +88,10 @@ InboundGroupSession.prototype['decrypt'] = restore_stack(function( 0, "i8" ); - return Pointer_stringify(plaintext_buffer); + return { + "plaintext": Pointer_stringify(plaintext_buffer), + "message_index": Module['getValue'](message_index, "i32") + } }); InboundGroupSession.prototype['session_id'] = restore_stack(function() { |