1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Processing of received room key requests

Doesn't actually do any of the crypto magic yet.
This commit is contained in:
Richard van der Hoff
2017-05-31 11:23:47 +01:00
parent 97951e1c1a
commit c8eca50f43
3 changed files with 154 additions and 0 deletions

View File

@@ -140,6 +140,26 @@ class DecryptionAlgorithm {
importRoomKey(session) {
// ignore by default
}
/**
* Determine if we have the keys necessary to respond to a room key request
*
* @param {module:crypto#RoomKeyRequest} keyRequest
* @return {boolean} true if we have the keys and could (theoretically) share
* them; else false.
*/
hasKeysForKeyRequest(keyRequest) {
return false;
}
/**
* Send the response to a room key request
*
* @param {module:crypto#RoomKeyRequest} keyRequest
*/
shareKeysWithDevice(keyRequest) {
throw new Error("shareKeysWithDevice not supported for this DecryptionAlgorithm");
}
}
export {DecryptionAlgorithm}; // https://github.com/jsdoc3/jsdoc/issues/1272