OlmManager class

Constructors

OlmManager(Encryption encryption)

Properties

client Client
no setter
currentUpload ↔ CancelableOperation<Map<String, int>>?
getter/setter pair
enabled bool
no setter
encryption Encryption
final
fingerprintKey String?
no setter
hashCode int
The hash code for this object.
no setterinherited
identityKey String?
no setter
olmSessions Map<String, List<OlmSession>>
A map from Curve25519 identity keys to existing olm sessions.
no setter
ourDeviceId String?
getter/setter pair
pickledOlmAccount String?
Returns the base64 encoded keys to store them in a store. This String should never leave the device!
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decryptToDeviceEvent(ToDeviceEvent event) Future<ToDeviceEvent>
dispose() Future<void>
encryptToDeviceMessage(List<DeviceKeys> deviceKeys, String type, Map<String, dynamic> payload) Future<Map<String, Map<String, Map<String, dynamic>>>>
encryptToDeviceMessagePayload(DeviceKeys device, String type, Map<String, dynamic> payload, {bool getFromDb = true}) Future<Map<String, dynamic>>
Encryptes a ToDeviceMessage for the given device with an existing olm session. Throws NoOlmSessionFoundException if there is no olm session with this device and none could be created.
getOlmSessions(String senderKey, {bool getFromDb = true}) Future<List<OlmSession>>
getOlmSessionsForDevicesFromDatabase(List<String> senderKeys) Future<void>
getOlmSessionsFromDatabase(String senderKey) Future<List<OlmSession>>
handleDeviceOneTimeKeysCount(Map<String, int>? countJson, List<String>? unusedFallbackKeyTypes) Future<void>
handleToDeviceEvent(ToDeviceEvent event) Future<void>
init({String? olmAccount, required String? deviceId, String? pickleKey}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickleOlmAccountWithKey(String key) String?
restoreOlmSession(String userId, String senderKey) Future<void>
signJson(Map<String, dynamic> payload) Map<String, dynamic>
Adds a signature to this json from this olm account and returns the signed json.
signString(String s) String
startOutgoingOlmSessions(List<DeviceKeys> deviceKeys) Future<void>
storeOlmSession(OlmSession session) Future<void>
toString() String
A string representation of this object.
inherited
uploadKeys({bool uploadDeviceKeys = false, int? oldKeyCount = 0, bool updateDatabase = true, bool? unusedFallbackKey = false, bool skipAllUploads = false, int retry = 1}) Future<bool>
Generates new one time keys, signs everything and upload it to the server. If retry is > 0, the request will be retried with new OTKs on upload failure.

Operators

operator ==(Object other) bool
The equality operator.
inherited