1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

support for unpacking megolm keys

This is incredibly hacky at the moment, pending the arrival of ephemeral
events, but it kinda works.
This commit is contained in:
Richard van der Hoff
2016-08-19 16:08:43 +01:00
parent e4bfb3ca32
commit 1159e0911f
5 changed files with 93 additions and 15 deletions

View File

@@ -93,12 +93,16 @@ EncryptionAlgorithm.prototype.initRoomEncryption = function(roomMembers) {
* base type for decryption implementations
*
* @constructor
* @alias module:crypto-algorithms/base.DecryptionAlgorithm
*
* @param {object} params parameters
* @param {module:OlmDevice} params.olmDevice olm.js wrapper
*/
module.exports.DecryptionAlgorithm = function(params) {
var DecryptionAlgorithm = function(params) {
this._olmDevice = params.olmDevice;
};
/** */
module.exports.DecryptionAlgorithm = DecryptionAlgorithm;
/**
* Decrypt an event
@@ -114,6 +118,17 @@ module.exports.DecryptionAlgorithm = function(params) {
* problem decrypting the event
*/
/**
* Handle a key event
*
* @method module:crypto-algorithms/base.DecryptionAlgorithm#onRoomKeyEvent
*
* @param {module:modules/event~MatrixEvent} event key event
*/
DecryptionAlgorithm.prototype.onRoomKeyEvent = function(params) {
// ignore by default
};
/**
* Exception thrown when decryption fails
*