Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const calculateTempValuesforSecretKey = (listSorted, participantJid, uid, callback) => {
- getPreviousNext(listSorted, participantJid, (current, previous, next) => {
- if (!_.has(next, 'd')) {
- return cryptoHelpers.xorBuffers([generateBuffer(current.d), generateBuffer(next.z)], (value) => {
- next.d = value;
- calculateTempValuesforSecretKey(listSorted, next.jid, uid, callback);
- });
- }
- const buffers = _.map(listSorted, participant => participant.d);
- buffers.push(generateBuffer(uid));
- _.each(buffers, buffer => buffer.toString('hex'));
- return callback(cryptoHelpers.hashBufferList(buffers));
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement