checkpoint

This commit is contained in:
John Smith
2023-05-26 00:53:07 +01:00
parent cefbeed09a
commit 5b0bfcef48
8 changed files with 178 additions and 35 deletions

View File

@@ -66,6 +66,8 @@ Future<VeilidConfig> getDefaultVeilidConfig(String programName) async {
alwaysUseInsecureStorage: false,
directory: "",
delete: false,
deviceEncryptionKey: "",
newDeviceEncryptionKey: null,
),
tableStore: VeilidConfigTableStore(
directory: kIsWeb

View File

@@ -828,13 +828,16 @@ class VeilidConfigProtectedStore {
bool alwaysUseInsecureStorage;
String directory;
bool delete;
String deviceEncryptionKey;
String? newDeviceEncryptionKey;
VeilidConfigProtectedStore({
required this.allowInsecureFallback,
required this.alwaysUseInsecureStorage,
required this.directory,
required this.delete,
});
VeilidConfigProtectedStore(
{required this.allowInsecureFallback,
required this.alwaysUseInsecureStorage,
required this.directory,
required this.delete,
required this.deviceEncryptionKey,
String? newDeviceEncryptionKey});
Map<String, dynamic> toJson() {
return {
@@ -842,6 +845,8 @@ class VeilidConfigProtectedStore {
'always_use_insecure_storage': alwaysUseInsecureStorage,
'directory': directory,
'delete': delete,
'device_encryption_key': deviceEncryptionKey,
'new_device_encryption_key': newDeviceEncryptionKey,
};
}
@@ -849,7 +854,9 @@ class VeilidConfigProtectedStore {
: allowInsecureFallback = json['allow_insecure_fallback'],
alwaysUseInsecureStorage = json['always_use_insecure_storage'],
directory = json['directory'],
delete = json['delete'];
delete = json['delete'],
deviceEncryptionKey = json['device_encryption_key'],
newDeviceEncryptionKey = json['new_device_encryption_key'];
}
////////////