aboutsummaryrefslogtreecommitdiff
path: root/javascript/demo
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-10-20 09:58:55 +0100
committerMark Haines <mjark@negativecurvature.net>2016-10-20 09:58:55 +0100
commit653790eacbf7dcf94cbf181657cdb0c30c890c3f (patch)
tree6cf8ca49bff13c01d18c15cd8e1a5e53c1cf9167 /javascript/demo
parent6ea9fb450ec1ef10b32d65ceb00a6042b927a95c (diff)
Return the message index when decrypting group messages.
Applications can use the index to detect replays of the same message.
Diffstat (limited to 'javascript/demo')
-rw-r--r--javascript/demo/group_demo.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/javascript/demo/group_demo.js b/javascript/demo/group_demo.js
index 1b8f7ab..42a3d84 100644
--- a/javascript/demo/group_demo.js
+++ b/javascript/demo/group_demo.js
@@ -403,8 +403,8 @@ DemoUser.prototype.decryptGroup = function(jsonpacket, callback) {
throw new Error("Unknown session id " + session_id);
}
- var plaintext = session.decrypt(packet.body);
- done(plaintext);
+ var result = session.decrypt(packet.body);
+ done(result.plaintext);
}, callback);
};