devicesMissingKeys method
List which of the devices of the current account are missing keys, so you can call massReencrypt for them.
forceLocalAccountUpdate
- Whether to update the local account. true
to update, false
to not update.
Returns a list of SealdDeviceMissingKeys instances.
Implementation
List<SealdDeviceMissingKeys> devicesMissingKeys(
{bool forceLocalAccountUpdate = false}) {
if (_closed) {
throw SealdException(
code: "INSTANCE_CLOSED",
id: "FLUTTER_INSTANCE_CLOSED",
description: "Instance already closed.");
}
final Pointer<Pointer<NativeSealdDeviceMissingKeysArray>> result =
calloc<Pointer<NativeSealdDeviceMissingKeysArray>>();
final Pointer<Pointer<NativeSealdError>> err =
calloc<Pointer<NativeSealdError>>();
final int resultCode = _bindings.SealdSdk_DevicesMissingKeys(
_ptr.pointer(), forceLocalAccountUpdate ? 1 : 0, result, err);
if (resultCode != 0) {
calloc.free(result);
throw SealdException._fromCPtr(err);
} else {
final List<SealdDeviceMissingKeys> missingKeys =
SealdDeviceMissingKeys._fromCArray(result.value);
calloc.free(result);
calloc.free(err);
return missingKeys;
}
}