mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-06 20:19:30 +01:00
fix: Linux failing on attempting to open hive
This commit is contained in:
parent
9a74d0977b
commit
76e476e2f9
@ -49,9 +49,12 @@ class FlutterFamedlySdkHiveDatabase extends FamedlySdkHiveDatabase {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final encryptionKey = base64Url.decode(
|
// workaround for if we just wrote to the key and it still doesn't exist
|
||||||
await secureStorage.read(key: _hiveCipherStorageKey),
|
final rawEncryptionKey =
|
||||||
);
|
await secureStorage.read(key: _hiveCipherStorageKey);
|
||||||
|
if (rawEncryptionKey == null) throw MissingPluginException();
|
||||||
|
|
||||||
|
final encryptionKey = base64Url.decode(rawEncryptionKey);
|
||||||
hiverCipher = HiveAesCipher(encryptionKey);
|
hiverCipher = HiveAesCipher(encryptionKey);
|
||||||
} on MissingPluginException catch (_) {
|
} on MissingPluginException catch (_) {
|
||||||
Logs().i('Hive encryption is not supported on this platform');
|
Logs().i('Hive encryption is not supported on this platform');
|
||||||
|
Loading…
Reference in New Issue
Block a user