generateDbKey method

Future<Uint8List> generateDbKey()

Implementation

Future<Uint8List> generateDbKey() async {
  String? key = await sl<DeviceInfoHandler>().getBindingId();
  if (key == null) {
    const uuid = Uuid();
    key = uuid.v5(Namespace.url.value, "ezto.io");
  }
  final sha = toSha256Hash(utf8.encode(key));
  return utf8.encode(sha).sublist(0, 16);
}