storeEncryptionKey static method

Future<void> storeEncryptionKey(
  1. List<int> key
)

Implementation

static Future<void> storeEncryptionKey(List<int> key) async {
  if (DeviceHelper.isWeb) {
    final keyString = key.join(',');
    html.window.localStorage[sessionEncryptionKey] = keyString;
  } else {
    final box = await Hive.openBox('myBox');
    await box.put(sessionEncryptionKey, key.join(','));
    await box.close();
  }
}