decryptMapValue method

  1. @override
FutureOr<Map<String, dynamic>> decryptMapValue({
  1. required Map<String, dynamic> data,
  2. String moduleKey = defaultModuleKey,
  3. List<String> skipForKey = const [],
})
override

Implementation

@override
FutureOr<Map<String, dynamic>> decryptMapValue({required Map<String, dynamic> data, String moduleKey = defaultModuleKey, List<String> skipForKey = const []}) async {
  //Info to pass into isolate
  if(!module.containsKey(moduleKey)){
    throw NUICryptoException(cause: NUICryptoError.KEY_NOT_FOUND);
  }

  try{
    return await _doMapDecryption(data, module[moduleKey]!, skipForKey);
  }on Exception catch(e){
    logNUI("NUICryptography in Flutter Isolate", "Encryption Exception ${e.toString()}");
    rethrow;
  }
}