Class EfCryptoStore
ICryptoStore in the client's SQLite database; pickles are encrypted with the key in crypto.key.
Inheritance
EfCryptoStore
Namespace: Uniform.Matrix.Client.Storage
Assembly: Uniform.Matrix.Client.dll
public sealed class EfCryptoStore : ICryptoStore
Constructors
|
Edit this page
View Source
EfCryptoStore(IDbContextFactory<ClientDbContext>)
Create a store over contexts.
Declaration
public EfCryptoStore(IDbContextFactory<ClientDbContext> contexts)
Parameters
Properties
|
Edit this page
View Source
Declaration
public string? DeviceId { get; }
Property Value
Methods
|
Edit this page
View Source
Remove a room's outbound session.
Declaration
public Task DeleteOutboundGroupSessionAsync(string roomId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task<AccountRecord?> LoadAccountAsync(CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task<IReadOnlyList<DeviceListRecord>> LoadDeviceListsAsync(CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return an inbound session.
Declaration
public Task<InboundGroupSessionRecord?> LoadInboundGroupSessionAsync(string roomId, string sessionId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return sessions with a device.
Declaration
public Task<IReadOnlyList<OlmSessionRecord>> LoadOlmSessionsAsync(string senderKey, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return a room's outbound session.
Declaration
public Task<OutboundGroupSessionRecord?> LoadOutboundGroupSessionAsync(string roomId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return sessions not backed up.
Declaration
public Task<IReadOnlyList<InboundGroupSessionRecord>> LoadSessionsToBackUpAsync(int limit, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task<string?> LoadValueAsync(string name, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Mark all sessions not backed up.
Declaration
public Task ResetBackedUpAsync(CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Clear all encryption state when it belongs to another device than deviceId, e.g. after a new login.
Declaration
public Task<bool> ResetForDeviceAsync(string deviceId, CancellationToken cancellationToken = default)
Parameters
Returns
| Type |
Description |
| Task<bool> |
Whether state was cleared.
|
|
Edit this page
View Source
Declaration
public Task SaveAccountAsync(AccountRecord account, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task SaveDeviceListAsync(DeviceListRecord deviceList, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task SaveInboundGroupSessionAsync(InboundGroupSessionRecord session, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task SaveOlmSessionAsync(OlmSessionRecord session, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Save a room's outbound session.
Declaration
public Task SaveOutboundGroupSessionAsync(OutboundGroupSessionRecord session, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Declaration
public Task SaveValueAsync(string name, string? value, CancellationToken cancellationToken)
Parameters
Returns
Implements