mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
Merge branch 'soru/fix-linux' into 'main'
fix: Linux failing on attempting to open hive See merge request famedly/fluffychat!447
This commit is contained in:
commit
b213ed74ba
@ -49,9 +49,12 @@ class FlutterFamedlySdkHiveDatabase extends FamedlySdkHiveDatabase {
|
||||
);
|
||||
}
|
||||
|
||||
final encryptionKey = base64Url.decode(
|
||||
await secureStorage.read(key: _hiveCipherStorageKey),
|
||||
);
|
||||
// workaround for if we just wrote to the key and it still doesn't exist
|
||||
final rawEncryptionKey =
|
||||
await secureStorage.read(key: _hiveCipherStorageKey);
|
||||
if (rawEncryptionKey == null) throw MissingPluginException();
|
||||
|
||||
final encryptionKey = base64Url.decode(rawEncryptionKey);
|
||||
hiverCipher = HiveAesCipher(encryptionKey);
|
||||
} on MissingPluginException catch (_) {
|
||||
Logs().i('Hive encryption is not supported on this platform');
|
||||
|
Loading…
Reference in New Issue
Block a user