getEncryptionKey static method

Future<List<int>> getEncryptionKey()

Implementation

static Future<List<int>> getEncryptionKey() async {
  final existingKey = await retrieveKey();
  if (existingKey != null) {
    return existingKey;
  } else {
    final List<int> newKey = Hive.generateSecureKey();
    await storeEncryptionKey(newKey);
    return newKey;
  }
}